Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Da Snoop

How to activate and disable ambient sounds?

Recommended Posts

Hi'
I would like to know how to activate and disable the ambient sounds during gameplay. For example: the player will enter a level with emergency alarm sound and when he activates the terminal, the sound will be terminated. And if it's possible to re-activate it again by pressing on the same terminal (somehow via ACS script?). The Team TNT has this effect in it's Doom 2000 (in the "reactor" level). Something f***s up and the alarm starts screaming. When the thread is solved and the player returns to the level, there is no alarm sound. It is the trick with door/platform sequences or what? I hope there is a way how to do this.
Thank you for replies :)

Share this post


Link to post

This has been mentioned on the zdoom forums. It was suggested that it might be possible to make ambient sound things activatable and deactivatable using the ACS Thing_Activate and Thing_Deactivate commands. Unfortunately, at present, ambient sound things will always make a sound, whether set as dormant or not. I think you can remove, or destroy them though, using the appropriate ACS commands.

You can play ambient sounds using scripts, however. The ambientsound command will play a sound that can be heard by all players, and the thingsound command will play a sound at a map spot with the tid identified in the script.

eg:

ambientsound ("soundname", 127);
or
thingsound(tid, "soundname", 127);

The 127 is the volume. Other values have been reported as having problems, but I haven't got much experience with that.

If you want a sound to repeat, you could creat a looping script using the restart command.

If you want the looping script to stop, you can use a linedef to stop the script or the ACS_Suspend or ACS_Terminate commands in a script.


Share this post


Link to post

Well, i've got an idea... you could place a AMBIENT sound making thing under a independent sector. After the player crossed a certain line-def..You can make the ceiling fall down and crush the Ambient sound thingy.... just an idea.

Share this post


Link to post

just write this

Thing_Activate (tag of the ambiant sound);

and

Thing_DeActivate (tag of the ambiant sound);

This 2 command work fine with ZDoom 1.23 Beta 25

I used it in some of my ZD3K maps

Share this post


Link to post

Cool, I didn't think Randy had implemented that yet. Thanks.

(BTW, I am pretty sure ambient sound things cannot be crushed by a crushing ceiling.)

Share this post


Link to post
Guest
This topic is now closed to further replies.
Sign in to follow this  
×