locked door
Moderator: Moderators
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
locked door
quick easy question. how do u make a locked door? just like u walk up to it and it makes the lock noise.
exec global/door_locked.scr
//**********************************************************************
//*** locked sounds for doors
//*** place a trigger_use in front of the door you want to be locked
//*** make the targetname of the trigger 'door_locked'
//*** add a keyvalue to the trigger of $type [wood | metal | metal_garage]
//*** if you put nothing, then wood is default
//**********************************************************************
//**********************************************************************
//*** locked sounds for doors
//*** place a trigger_use in front of the door you want to be locked
//*** make the targetname of the trigger 'door_locked'
//*** add a keyvalue to the trigger of $type [wood | metal | metal_garage]
//*** if you put nothing, then wood is default
//**********************************************************************
Last edited by bdbodger on Sat Jan 03, 2004 2:47 am, edited 1 time in total.
locked
There is a value missing from the comment, it is "large". Here is an example:
key: $type
Value: large
And the line that goes under "level waittill prespawn" is:
exec global/door_locked.scr::lock
key: $type
Value: large
And the line that goes under "level waittill prespawn" is:
exec global/door_locked.scr::lock
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
There is a tutorial for it here at .map
There is a tutorial for it here at .map and it explains everything.
Basically that line from the door_locked script bdbodger showed you is the one that looks for the targetname "door_locked" and assigns different index numbers to each trigger_use it finds--with that name.
Hmmm, just noticed that there is no sound in ubersound for "door_locked_large", so don't use:
Key: $type
Value: large
because it wont work.
bdbodger -- You are right, that line would still work without the "lock" thread being called, because it is the first thread in the script anyway. I just added it, because that is how 2015 has it in their scripts.
Yes, "main" is just a name and any name can be used for the first thread in a script. And, as you probably know, the first thread can be bypassed using the "::" command to make it point to a different thread.
Basically that line from the door_locked script bdbodger showed you is the one that looks for the targetname "door_locked" and assigns different index numbers to each trigger_use it finds--with that name.
Hmmm, just noticed that there is no sound in ubersound for "door_locked_large", so don't use:
Key: $type
Value: large
because it wont work.
bdbodger -- You are right, that line would still work without the "lock" thread being called, because it is the first thread in the script anyway. I just added it, because that is how 2015 has it in their scripts.
Yes, "main" is just a name and any name can be used for the first thread in a script. And, as you probably know, the first thread can be bypassed using the "::" command to make it point to a different thread.
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
locked
Ok then:
1. Under "level waitill prespawn" in your script add this line.
exec global/door_locked.scr::lock
2. In your map, place trigger brushes in front of all the doors you want locked.
3. Highlight one of them and hit key N.
4. Find "trigger_use" on the list and double click it.
5. Add this key/value.
Key: targetname
Value: door_locked
6. do the same (steps 3-5) for all the trigger brushes.
7. The end.
1. Under "level waitill prespawn" in your script add this line.
exec global/door_locked.scr::lock
2. In your map, place trigger brushes in front of all the doors you want locked.
3. Highlight one of them and hit key N.
4. Find "trigger_use" on the list and double click it.
5. Add this key/value.
Key: targetname
Value: door_locked
6. do the same (steps 3-5) for all the trigger brushes.
7. The end.
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
-
omniscient
- Major General
- Posts: 694
- Joined: Tue Sep 16, 2003 12:02 am
