Page 1 of 1

Locked door with sound

Posted: Thu Feb 27, 2003 5:18 pm
by 6thDLI-Quantum
Just a quick question, how do I make a door that is locked, and plays the locked sound?

I guess that I do not add the func_rotatingdoor to the door/hinge entities to stop it opening, but is that all.

Posted: Thu Feb 27, 2003 5:41 pm
by jv_map
I think we have a tutorial on that subject.

Posted: Thu Feb 27, 2003 6:36 pm
by 6thDLI-Quantum
It's not quite what I am looking for. That tutorial allows the doors to be locked and unlocked during the game. I need mine to remain locked, but to play the locked sound.

It's really the sound thing that I am struggling with. I could set up a trigger to play the sound when someone goes near the door, but that isn't realistic.

Posted: Thu Feb 27, 2003 10:09 pm
by CHeesER
Create a brush for your door,but do not make it a func_door.Just a brush that looks like a door.

You also need to add a trigger use to get the door locked sound.
So create a brush and make it a trigger_use,and put it in front of the door.
In Radiant add these settings,

classname // trigger_use
targetname // door_locked

so if you have more locked doors,you use the same settings for all

You need to add to your map script,after waitTill prespawn
exec global/door_locked.scr::lock

Follow this mini-tut,and you will have doors that do not open,and that have sound.

Posted: Thu Feb 27, 2003 10:41 pm
by panTera
(edited: oops, Cheeser was here first :roll: . Ah well, the more info the better;)

There's a global/door_locked.script in pak0.pk3. If you open this in Wordpad you'll see a description at the top of the text.
But in short:

in Radiant:
- place a trigger_use in front of the door you want to be locked (in this case the '"door" is just a world brush)
- set a Key: targetname and a Value: door_locked,

For the type of the sound also add a Key to the trigger of $type and a Value of wood, metalor metal_garage. If you put nothing, then wood is default.

Right, now all you have to do is add this line in the script of your map, after the 'level waittill prespawn' part:

exec global/door_locked.scr::lock

Et vo?la, there's your locked "door".

Posted: Thu Feb 27, 2003 10:48 pm
by 6thDLI-Quantum
Thanks guys :D

Posted: Fri Feb 28, 2003 9:40 am
by CHeesER
Thanks Pantera, I did not no about which sound it made part,never really thought about it.