thx
Locking a door
Moderator: Moderators
- MasterMind
- Major
- Posts: 316
- Joined: Thu Jul 15, 2004 12:10 am
Locking a door
I was wondering, how do i make a door that can be locked and unlocked from a single switch? Also I'd like the swicth to be animated and the door to make a locked sound when its locked
thx
thx
Jesus built us a bridge, with 2 boards and 3 nails.
This is from a scripters perspective:
Make a regular func_rotatingdoor
Give it a key/value of
$targetname/door
Make a switch model, and put a trigger-use around it
give the trigger key/values of
wait/5
setthread/doDoor
Give the switch key/values of
$targetname/switch
Open script, make a new thread.
in your main thread after level waittill spawn:
Make a regular func_rotatingdoor
Give it a key/value of
$targetname/door
Make a switch model, and put a trigger-use around it
give the trigger key/values of
wait/5
setthread/doDoor
Give the switch key/values of
$targetname/switch
Open script, make a new thread.
Code: Select all
doDoor:
//switch anim code, don't know it right offhand
if(level.doorLock == 0)
{
$door unlock
$switch anim alarm_turnon
$switch playsound alarm_switch
}
if(level.doorLock == 1)
{
$door lock
$switch anim alarm_turnoff
$switch playsound alarm_switch
}
endCode: Select all
$door lock
level.doorLock = 0Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
lock
Here is a tutorial map that has lockable doors. The zip file contains the .map file, a playable pk3, and a text version of the script.
http://pages.sbcglobal.net/tltrude/Temp ... e_test.zip

http://pages.sbcglobal.net/tltrude/Temp ... e_test.zip

- MasterMind
- Major
- Posts: 316
- Joined: Thu Jul 15, 2004 12:10 am
- MasterMind
- Major
- Posts: 316
- Joined: Thu Jul 15, 2004 12:10 am
- MasterMind
- Major
- Posts: 316
- Joined: Thu Jul 15, 2004 12:10 am
