Locked door settings
Moderator: Moderators
- Indianajones
- Colour Sergeant
- Posts: 86
- Joined: Sat Aug 20, 2005 1:14 pm
Locked door settings
How do I set my door as locked and have a locked sound when tryed to enter.
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
He also made an other nice map tut, with 35 different kind of doors:
http://smallsumo.leveledit.com/tltrude/Temp/door2.zip
lock
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!
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!
Last edited by tltrude on Tue Aug 30, 2005 6:29 pm, edited 1 time in total.
- Indianajones
- Colour Sergeant
- Posts: 86
- Joined: Sat Aug 20, 2005 1:14 pm
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.
like v2door1
and in my script after spawn thread something like this.
Code: Select all
doors:
v2door1 lock
endeither way, the door is locked. note that with the doors thread you dont need a trigger.
Moderator
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
۞
Abyssus pro sapientia
Olympus pro Ignarus
۞
AND STUFF™ © 2006
- Indianajones
- Colour Sergeant
- Posts: 86
- Joined: Sat Aug 20, 2005 1:14 pm
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?????????????
exec global/door_locked.scr::lock
then press enter and its done.
Is that correct?????????????
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.
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.
(\_/)
(O.o) This is Bunny. Copy Bunny
(> <) to help him achieve world domination.
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.
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.
Last edited by tltrude on Wed Aug 31, 2005 8:20 pm, edited 1 time in total.
- Indianajones
- Colour Sergeant
- Posts: 86
- Joined: Sat Aug 20, 2005 1:14 pm
- Indianajones
- Colour Sergeant
- Posts: 86
- Joined: Sat Aug 20, 2005 1:14 pm
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?
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
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.
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).
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
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).
