Page 1 of 1
Locked door settings
Posted: Mon Aug 29, 2005 3:19 pm
by Indianajones
How do I set my door as locked and have a locked sound when tryed to enter.
Posted: Mon Aug 29, 2005 3:35 pm
by At0miC
Here is a nice map tut by tltrude to see how it's done:
http://pages.sbcglobal.net/tltrude/Temp ... e_test.zip
He also made an other nice map tut, with 35 different kind of doors:
http://smallsumo.leveledit.com/tltrude/Temp/door2.zip
Posted: Mon Aug 29, 2005 4:54 pm
by Indianajones
Thanks you
lock
Posted: Mon Aug 29, 2005 5:12 pm
by tltrude
You don't need that tutorial map because it is for doors that can be locked and unlocked.
It is easier just to use the global/door_locked.scr script and a few triggers.
1. Create a trigger_use infront of each door brush you want to sound locked.
2. Targetname all of the triggers door_locked. If it is a metal door, add Key: type and value: metal -- type wood is default.
3. In your script, below level waittill prespawn, add this line.
exec global/door_locked.scr::lock
4. Done!
Posted: Mon Aug 29, 2005 7:10 pm
by At0miC
Oh oops my fault, I thought he wanted to lock a scripted door using a trigger

Posted: Tue Aug 30, 2005 5:10 pm
by Indianajones
I thought it looked complex.
Just want to have a locked sound no switches just locked sound please.
Posted: Tue Aug 30, 2005 6:23 pm
by lizardkid
for me it's easier to name them whatever, with references to wher they are in the map...
like v2door1
and in my script after spawn thread something like this.
but thats just me, if you want them to STAY locked then door_locked is probably more efficient.
either way, the door is locked. note that with the doors thread you dont need a trigger.
Posted: Tue Aug 30, 2005 6:32 pm
by tltrude
With lizardkid's method, the door brush has to be an entity with a targetname. So, it is easier to just use triggers that all have one targetname. Also, using the door_locked script method, the sound can be changed for metal textured door brushes.
Posted: Wed Aug 31, 2005 6:53 pm
by Indianajones
so left click select (trigger/use) then select the trigger put infront of door then press n then type in the key colum door_locked and leave value empty because the wood door sound is default then press enter and cilck script button at bottom of the entity screen and type in
exec global/door_locked.scr::lock
then press enter and its done.
Is that correct?????????????
Posted: Wed Aug 31, 2005 6:55 pm
by Kiko
I believe you wouldn't have to put a "type" because the default type is wood... so if its default then you won't need anything.
It's like on doors swingaway 1 is always default, but yet you dont type swingaway as a key and nothing for value... you just dont' type swingaway at all because its default.
Posted: Wed Aug 31, 2005 7:59 pm
by tltrude
first make sure all the trigger brushes are trigger_use entities. Highlight them one at a time and hit key N. Then double click trigger_use from the list at the top. It should say classname trigger_use in the properties box. Now you can highlight them all and add this key/value.
Key: targetname
Value: door_locked
You can highlight all the triggers at the same time because they all need the same targetname.
Then highlight just the metal door triggers and add this (key N again).
Key: type
Value: metal
If they are all metal doors, you can just add the type when you do the targetname.
Posted: Wed Aug 31, 2005 8:14 pm
by Indianajones
thanks ile try it and see how it goes.
Posted: Thu Sep 01, 2005 7:16 pm
by Indianajones
I did everything you said but there is no sound when I press E to try and enter the room.
I have only tryed it on one door, do I need to select the door as well so it knows what to trigger for the sound.
3. In your script, below level waittill prespawn, add this line.
exec global/door_locked.scr::lock
What do you mean wait till prespawn???????????????
I think this might be the bit I did wrong?
door
Posted: Thu Sep 01, 2005 8:26 pm
by tltrude
No, the door brush is just a dummy, not an entity. It is the trigger that makes the sound.
Here is the script from mohdm2, so you can compare it to yours. It is not that hard, if you study it for a while. Notice that this script has two threads. Threads start with a name and a colon: and end with the word "end". the thread "roundbasedthread:" would not normally be used for deathmatch games, but it is there if anyone wants to play a roundbased game with the same map/script.
Code: Select all
main:
// set scoreboard messages
setcvar "g_obj_alliedtext1" "Destroyed Village"
setcvar "g_obj_alliedtext2" ""
setcvar "g_obj_alliedtext3" ""
setcvar "g_obj_axistext1" ""
setcvar "g_obj_axistext2" ""
setcvar "g_obj_axistext3" ""
setcvar "g_scoreboardpic" "mohdm2" //<--for your map use "none".
// call additional stuff for playing this map round based is needed
if(level.roundbased)
thread roundbasedthread
level waittill prespawn
//*** Precache Dm Stuff
exec global/DMprecache.scr
exec global/door_locked.scr::lock
level.script = maps/dm/mohdm2.scr //<--use your map name.
exec global/ambient.scr mohdm2 //<--will use the background sound from this map.
level waittill spawn
end
//-----------------------------------------------------------------------------
roundbasedthread:
// Can specify different scoreboard messages for round based here.
level waitTill prespawn
level waittill spawn
// set the parameters for this round based match
level.dmrespawning = 0 // 1 or 0
level.dmroundlimit = 5 // round time limit in minutes
level.clockside = kills // set to axis, allies, kills, or draw
level waittill roundstart
end
You can use the script above, but modify it to work with your bsp name. The script should be saved as "mymapname.scr" and placed in the same folder as your "mymapname.bsp".
The ambient sound line should not have your map's name. Instead, use the name of a stock map to borrow the background sound from it (mohdm7 is a good one because it is just wind sounds).
Posted: Thu Sep 01, 2005 9:19 pm
by Indianajones
Right ile have a go.