Page 1 of 2

3 pressure plates, 1 door.

Posted: Thu Nov 01, 2012 2:37 pm
by Nickydude
No, it's not a dodgy video lol!

I want to have a secret door open only when things are placed on three pressure pads, activating them, but only when ALL three have been active (removing an object deactivates the pad).

Could anyone point me in the right direction? Any help would be much appreciated. :mrgreen:

Re: 3 pressure plates, 1 door.

Posted: Thu Nov 01, 2012 2:46 pm
by Komag
gotta love the easy ones!

two methods, editor objects alone, or script.

Editor Objects:
place a counter set to 3
link each plate to the counter with two connections:
"activate --> decrement"
"deactivate --> increment"
link the counter to the door. and depending on whether you want the door to open permanently or not:
permanent: link with "activate --> open"
not permanent (only stays open if all three plates stay down): link with "any --> toggle"

Script:

Code: Select all

function checkPlates()
  if plate1:isDown and plate2:isDown and plate3:isDown then
     thisDoor:open()
    else
     thisDoor:close()
  end
end
link each plate to the script with "any --> checkPlates"
that is the non permanent setup. if you want the door to open permanently just change the script to:

Code: Select all

function checkPlates()
  if plate1:isDown and plate2:isDown and plate3:isDown then
     thisDoor:open()
  end
end
I haven't tested any of that but it's pretty straightforward so it should work I think

Re: 3 pressure plates, 1 door.

Posted: Thu Nov 01, 2012 2:50 pm
by Nickydude
gotta love the easy ones!
Wow, quick and painless, excellent Komag thanks, I'll try that when i get home.

Edit: may i add this to the Dungeon Editor Guide I'm compiling?

Re: 3 pressure plates, 1 door.

Posted: Thu Nov 01, 2012 3:22 pm
by Komag
You can do whatever you want, but it might be helpful to get some more experience and expertise under your belt first so you will have a better idea what should be part of the guide :)

Re: 3 pressure plates, 1 door.

Posted: Thu Nov 01, 2012 9:03 pm
by Nickydude
I now have it working but I'd like 1 pressure pad to do two things:

1/. When only the party stands on it it opens 1 door.

2/. Only when an item is dropped on it it opens door 2.

At the moment door 2 opens whether and item or the player is stood on it, this is because I have 'Triggered by Party' ticked as I want it to open door one AND I have 'Triggered by Item' because I only want an item to trigger opening door 2. is there any way to do the above?

Re: 3 pressure plates, 1 door.

Posted: Thu Nov 01, 2012 9:10 pm
by Komag
two plates, it's the only (easy) way

Re: 3 pressure plates, 1 door.

Posted: Thu Nov 01, 2012 9:18 pm
by Nickydude
Hmmm... really want to keep to 1 plate doing both but I guess you can't, no worries, thanks again Komag.

Re: 3 pressure plates, 1 door.

Posted: Thu Nov 01, 2012 9:32 pm
by Komag
You have one visible plate that links to nothing, so it appears to go down but that's all, and goes down with party and items, this is the "fake" plate.
You have 2 hidden plates, one for party, one for item, these have the real connections :)

Re: 3 pressure plates, 1 door.

Posted: Thu Nov 01, 2012 9:39 pm
by Nickydude
You mean put two plates on one tile?

Re: 3 pressure plates, 1 door.

Posted: Thu Nov 01, 2012 9:40 pm
by Komag
in this case, three!