Btw, it's my first time working with scripts so
Pressure Plates question
Pressure Plates question
Hello everyone, I have a question regarding pressure plates. I was wondering if its possible to create a puzzle using several pressure plates. Something like there are 10 pressure plates in the room, if I place three items on specific pressure plates then the door opens. I looked through the scripting documentation and didnt find anything regarding getstate or something like that.
Btw, it's my first time working with scripts so

Btw, it's my first time working with scripts so
Re: Pressure Plates question
Well I'm also new, but I think you could set a counter with an initial value of 3 to open a door, then make it so the three specific pressure plates decease the counter by 1 when pressed, and increase when released.
Re: Pressure Plates question
Hmm, thanks, I'm gonna try that!Lmaoboat wrote:Well I'm also new, but I think you could set a counter with an initial value of 3 to open a door, then make it so the three specific pressure plates decease the counter by 1 when pressed, and increase when released.
Re: Pressure Plates question
Hmm, I wonder what I'm doing wrong
---opendoor
function open()
if counter_1:getValue() == "1" then
door_2:open()
end
end
I targeted a pressure plate to increment the counter value to one but still doesnt work
---opendoor
function open()
if counter_1:getValue() == "1" then
door_2:open()
end
end
I targeted a pressure plate to increment the counter value to one but still doesnt work
Re: Pressure Plates question
Try removing the quotation marks around 1. Things inside quotes are strings (like pieces of text). So in this case you weren't trying to compare the counter's value with the number of one but with a text that reads "1". Hope this clears it up a bit.DrTeflon wrote:Hmm, I wonder what I'm doing wrong
---opendoor
function open()
if counter_1:getValue() == "1" then
door_2:open()
end
end
I targeted a pressure plate to increment the counter value to one but still doesnt work
Steven Seagal of gaming industry
Re: Pressure Plates question
Thanks! as I said, its like my first time working with codeantti wrote:Try removing the quotation marks around 1. Things inside quotes are strings (like pieces of text). So in this case you weren't trying to compare the counter's value with the number of one but with a text that reads "1". Hope this clears it up a bit.DrTeflon wrote:Hmm, I wonder what I'm doing wrong
---opendoor
function open()
if counter_1:getValue() == "1" then
door_2:open()
end
end
I targeted a pressure plate to increment the counter value to one but still doesnt work
Tried it and it still doesnt work, maybe i'm doing something stupid, gotta run more tests
Re: Pressure Plates question
I don't think you need a script for this one, thought it's probably good to get practice.
Re: Pressure Plates question
I'm doing this a test and adding more pressure platesLmaoboat wrote:I don't think you need a script for this one, thought it's probably good to get practice.
Re: Pressure Plates question
you can do it with pressure plates properties "item", and activate the thing with a connector to your item... I dit it to open doors today... 
ad&d / ff / d&d
Re: Pressure Plates question
You can read some ideas relating to this in this thread:
viewtopic.php?f=14&t=3032
viewtopic.php?f=14&t=3032
Finished Dungeons - complete mods to play
