Hi, I'm brand new around these parts, and I'm also pretty novice when it comes to scripting. I've started work on a little dungeon of my own, and I wanted to create a mechanism that'll open a door when four levers are in the correct position. I browsed around the forum to figure out what I would need to do, and I think I'm close, but nothing is happening.
In any case, I have four levers (1,2,3 and 4) that need to be in positions DOWN, UP, DOWN, UP in order to open a door. This is my so far non-functioning code thus far:
Code: Select all
function doorleversright()
if lever_1:getLeverState() == "activated" and
lever_2:getLeverState() == "deactivated" and
lever_3:getLeverState() == "activated" and
lever_4:getLeverState() == "deactivated" then
dungeon_door_wooden_2:open()
else
dungeon_door_wooden_2:closed()
end end
What am I missing or do I need to change here? Do I maybe need to add an additional script? Any help would be much appreciated.