Lockable Doors

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
Cheetohs
Brigadier General
Posts: 569
Joined: Sun Jan 04, 2004 6:01 am
Location: Minnesota
Contact:

Lockable Doors

Post 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 :P , my bad.

New question i guess...

How do you rotate the Spawn points so that they face a different way when the players spawn?
.:c|H|EE|TO|H|s|:.
Image
Need a thorough map tester? Shine the Cheetohs signal!
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Re: Lockable Doors

Post 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:
Image The numbers are the angle in the top view (XY-view) or enter a key/value of angle/### in the lines above.
User avatar
Cheetohs
Brigadier General
Posts: 569
Joined: Sun Jan 04, 2004 6:01 am
Location: Minnesota
Contact:

Post 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.
.:c|H|EE|TO|H|s|:.
Image
Need a thorough map tester? Shine the Cheetohs signal!
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

script

Post by tltrude »

Do you have a script for your map?
Tom Trude,

Image
User avatar
Cheetohs
Brigadier General
Posts: 569
Joined: Sun Jan 04, 2004 6:01 am
Location: Minnesota
Contact:

Post 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
.:c|H|EE|TO|H|s|:.
Image
Need a thorough map tester? Shine the Cheetohs signal!
omniscient
Major General
Posts: 694
Joined: Tue Sep 16, 2003 12:02 am

Post by omniscient »

put the triggers that are infront of the door over your switch instead of the front of your door.
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

test map

Post 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

Image
Last edited by tltrude on Mon Jan 05, 2004 4:41 pm, edited 1 time in total.
Tom Trude,

Image
User avatar
Cheetohs
Brigadier General
Posts: 569
Joined: Sun Jan 04, 2004 6:01 am
Location: Minnesota
Contact:

Post by Cheetohs »

Thanx guys, that is exactly what im looking for tltrude! :D
.:c|H|EE|TO|H|s|:.
Image
Need a thorough map tester? Shine the Cheetohs signal!
Post Reply