Locked door with sound

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

Moderator: Moderators

Post Reply
6thDLI-Quantum
Corporal
Posts: 44
Joined: Tue Jan 14, 2003 6:08 pm

Locked door with sound

Post 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.
[6th-DLI]Quantum

In the land of the blind, the one-eyed man is King.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

I think we have a tutorial on that subject.
Image
6thDLI-Quantum
Corporal
Posts: 44
Joined: Tue Jan 14, 2003 6:08 pm

Post 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.
[6th-DLI]Quantum

In the land of the blind, the one-eyed man is King.
CHeesER
Corporal
Posts: 25
Joined: Wed Feb 19, 2003 2:55 am
Location: Canada

Post 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.
panTera
Brigadier General
Posts: 573
Joined: Wed Jan 29, 2003 11:46 pm
Location: The Netherlands
Contact:

Post 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".
6thDLI-Quantum
Corporal
Posts: 44
Joined: Tue Jan 14, 2003 6:08 pm

Post by 6thDLI-Quantum »

Thanks guys :D
[6th-DLI]Quantum

In the land of the blind, the one-eyed man is King.
CHeesER
Corporal
Posts: 25
Joined: Wed Feb 19, 2003 2:55 am
Location: Canada

Post by CHeesER »

Thanks Pantera, I did not no about which sound it made part,never really thought about it.
Post Reply