Linking a door with a switch to open/close

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Post by mcunha98 »

Axion,

I try use the technique in doors and rotationdoors.
I put the sound_stop and sound_move directives agree with my alias defined in .scr file, but when i test my map, dont play the correct sound.

This image is relative a rotation door:
Image


My script file code:

Code: Select all

main:

	level waittill prespawn
	exec global/DMprecache.scr
	level.script = maps/dm/user_98kazaksilo.scr

	local.master = spawn ScriptMaster
	local.master aliascache door_98alert sound/mechanics/Mec_Alarm_03.wav soundparms 0.5 0.0 1.0 0.0 256 256 auto loaded maps "dm moh obj train"
	local.master aliascache door_98while sound/mechanics/Mec_SteamLoop_01.wav soundparms 0.5 0.0 1.0 0.0 256 256 auto loaded maps "dm moh obj train"
 	local.master aliascache door_98stop sound/mechanics/DoorWoodOpen_07.wav soundparms 0.5 0.0 1.0 0.0 256 256 auto loaded maps "dm moh obj train"

	exec global/ambient.scr mohdm4
        exec global/exploder.scr
	exec global/door_locked.scr::lock

	setcvar "g_dm_alliedtext1" "Kazak Silo" 
	setcvar "g_dm_alliedtext2" "by MCunha98"
	setcvar "g_dm_alliedtext3" ""
	setcvar "g_dm_axistext1" "Kazak Silo"
	setcvar "g_dm_axistext2" "by MCunha98"
	setcvar "g_dm_axistext3" ""
	setcvar "g_scoreboardpic" "none"

	level waittill spawn
end
Some thing wrong ??? :oops:
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

sound

Post by tltrude »

Try using these for the keys:

sound_open_start
sound_open_end
sound_close_start
sound_close_end


Example:

Key: sound_open_start
Value: door_98alert

Examples of how these are used can also be found here.
http://gronnevik.se/rjukan/index.php?n= ... veElevator

Notice that the "snd_step_paper" alias is used to kill some of the normal door sounds.
Tom Trude,

Image
User avatar
mcunha98
Lieutenant Colonel
Posts: 384
Joined: Sat Jan 17, 2004 1:52 am
Location: Brasil
Contact:

Re: sound

Post by mcunha98 »

tltrude wrote:Try using these for the keys:

sound_open_start
sound_open_end
sound_close_start
sound_close_end
TlTrude,

Thanks for your reply i will try this way.
But the sound "while/move" dont exist ?
In rotation door ok, the open and close is the events relatives, but dont exist a way to tell the move event (some like sound_move_????)
Green Beret
Major General
Posts: 746
Joined: Mon Apr 19, 2004 12:21 pm
Contact:

Post by Green Beret »

Did you put the sound file in the correct directory?
Try some default settings first and see.
From T|TRUDE
sound_open_start/lighthouse_run
sound_open_end/snd_step_paper
sound_close_start/lighthouse_run
sound_close_end/snd_step_paper
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

move

Post by tltrude »

I have never been able to get "sound_move" to work with func_rotatingdoor.
Tom Trude,

Image
User avatar
Axion
Major General
Posts: 683
Joined: Mon Sep 29, 2003 5:14 am
Location: Northern California
Contact:

Re: move

Post by Axion »

tltrude wrote:I have never been able to get "sound_move" to work with func_rotatingdoor.
I wish I had known that before I posed to use it.

:oops:
"The work of a thousand years is nothing but rubble."
- Dr. Carl Goerdeler (1943)
Visit my mapping site: http://www.freewebs.com/axion9
Image
Post Reply