Opening/Closing Doors With a Switch
Posted: Sat Feb 22, 2003 6:07 am
This concept is taken from Lazerus's Boonville map and was something I was trying to do for a while. In a discussion over at the Interplay mapping forums with Zousug I got on the right track with his suggestion to look at Boonville. So here is how a switch can be used to open and close a door without unlocking it:
Door entity:
-Is locked
-Is lockable
-Chance to unlock=0
-tagname=door
Switch Entity:
-Not on
-tagname=switch
Triggers
1. Open Door:
Condition-Object Script State of switch, checked
Action-Set Object Script State of door, checked
2. Close Door:
Condition-Object Script State of switch, not checked
Action-Set Object Script State of door, not checked
Door entity:
-Is locked
-Is lockable
-Chance to unlock=0
-tagname=door
Switch Entity:
-Not on
-tagname=switch
Triggers
1. Open Door:
Condition-Object Script State of switch, checked
Action-Set Object Script State of door, checked
2. Close Door:
Condition-Object Script State of switch, not checked
Action-Set Object Script State of door, not checked