Pressure Plates

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Ahmyo
Posts: 14
Joined: Wed Oct 24, 2012 12:50 pm

Pressure Plates

Post by Ahmyo »

Wishing there was a "Name:getPressurePlateState()"

So far I haven't found anything like that other than a trick with levers activated by plates, with the levers having their states recognized, which seems like something that shouldn't have to be done..

Is there a getState for plates?
User avatar
Wolfrug
Posts: 55
Joined: Wed Oct 03, 2012 6:56 pm

Re: Pressure Plates

Post by Wolfrug »

But there is!

PressurePlate:isDown()

and

PressurePlate:isUp()

Return true when they're down/up. :)

- Wolfrug
Try my Mordor: Depths of Dejenol LoG-ification. Feedback much appreciated!
User avatar
Ahmyo
Posts: 14
Joined: Wed Oct 24, 2012 12:50 pm

Re: Pressure Plates

Post by Ahmyo »

Oooh okay so then I could write something like

function leverdoor()

if leverwest:getLeverState() == "activated" and
PressurePlate:isUp() == true then
Door:open()
else
Door:close()
end
end

?

Edit:

Huzzah! That worked! Thank you very much for the help. ;)
User avatar
Komag
Posts: 3658
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: Pressure Plates

Post by Komag »

you can leave off the == true

Code: Select all

PressurePlate:isUp() then
Finished Dungeons - complete mods to play
User avatar
Ahmyo
Posts: 14
Joined: Wed Oct 24, 2012 12:50 pm

Re: Pressure Plates

Post by Ahmyo »

Oh thanks
Post Reply