Page 1 of 1
Lockable Doors
Posted: Sun Jan 04, 2004 6:07 am
by Cheetohs
Can anyone help me out with setting up a Door that is lockable by means of a switch? (example: Player opens door from outside, walks in room, hits a switch, door cannot open until switch is hit again). I've seen this before on maps but haven't figured it out yet... Thanx.
(update)Oops, i am sorry, I didnt notice that lockable doors link in the 'locked doors' Topic, I just read the first few posts of how he wanted a LOCKED door

, my bad.
New question i guess...
How do you rotate the Spawn points so that they face a different way when the players spawn?
Re: Lockable Doors
Posted: Sun Jan 04, 2004 10:04 am
by wacko
Cheetohs wrote:How do you rotate the Spawn points so that they face a different way when the players spawn?
Select the info_playerstart (or any other), press 'n', in the Entity window choose a different angle here:

The numbers are the angle in the top view (XY-view) or enter a key/value of angle/### in the lines above.
Posted: Sun Jan 04, 2004 9:40 pm
by Cheetohs
Thanx Wacko.
After doing that 'lockable doors' tut from this site, it didnt work the way i wanted it to. What i want is a visible switch (static_item_switch1) that when you click on the switch it LOCKS the door and will not open until that same switch is pressed again.
When I did the 'lockable doors tut' (maybe i did something wrong?) but anyhoo, the doors wouldnt actually lock. It just worked as a sliding Door with a 'Trigger_use' opener. The door would open from the outside and inside.
Can anyone please help me rig up the working switch? THanx.
script
Posted: Sun Jan 04, 2004 11:02 pm
by tltrude
Do you have a script for your map?
Posted: Mon Jan 05, 2004 1:18 am
by Cheetohs
yes, i have a script. here is the ending of it that contains the lock...
Code: Select all
exec global/door_locked.scr::lock
$dooropenerin nottriggerable
$dooropenerout nottriggerable
level waittill spawn
end
doorlock:
$outsidelock nottriggerable
$insidelock nottriggerable
$dooropenerin triggerable
$dooropenerout triggerable
wait 10
$dooropenerin nottriggerable
$dooropenerout nottriggerable
$outsidelock triggerable
$insidelock triggerable
end
Posted: Mon Jan 05, 2004 2:16 am
by omniscient
put the triggers that are infront of the door over your switch instead of the front of your door.
test map
Posted: Mon Jan 05, 2004 7:00 am
by tltrude
Turns out that all doors have built-in locks. If the door has a targetname, you can command it to "lock" or "unlock" in the script. A door that has been locked by the script will automattically play the locked sound (locked wooden door sound) when a player tries to open it.
$door1 lock
$door1 unlock
I made a tutorial map and script for it. The doors start locked, and I included animated switches to unlock/relock them. I added a metal locked sound to the doors--using a "sound_locked" key/value. The zip contains a playable pk3, the .map file, and a text version of the script.
http://pages.sbcglobal.net/tltrude/Temp ... e_test.zip

Posted: Mon Jan 05, 2004 1:31 pm
by Cheetohs
Thanx guys, that is exactly what im looking for tltrude!
