Page 1 of 1

Opening/Closing Doors With a Switch

Posted: Sat Feb 22, 2003 6:07 am
by Jimmyjay86
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

Posted: Sat Feb 22, 2003 6:36 am
by OnTheBounce
I wish I'd known you were in need of this, JJ86, I could have squared you away on the spot.

Oh, remember to check/tick "Preserve" for these triggers. Otherwise you end up w/the problem that Rock Falls (Mission 3) in the core campaign had: you could only open the door once.

Of course, if you want to be really mean, you can substitute a Science Switch for the standard Switch, and have it require a key... }:)

OTB

Posted: Sat Feb 22, 2003 7:34 am
by Max-Violence
OnTheBounce wrote:Of course, if you want to be really mean, you can substitute a Science Switch for the standard Switch, and have it require a key... }:)
Guilty!