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

finally! activate/disable amb works!

Recommended Posts

Finally!
I have trouble with activate/disable feature of the ambient sounds some time ago. I tried it with ACS command sound sequence in a decission. It works! I can now activate the console (or cross a line) when the alarm (or whatever ambient sound) starts and when I press (cross) the line again, it goes silent.

#include "zcommon.acs"

int snd1;

script 1 OPEN
{
snd1=0;
}

//Action line.
sript 2 (void)
{
if (!snd1) {
soundsequence ("DeepAlarm");
snd1=1;
}

else {
soundsequence ("CutEverything");
snd1=0;
}
}

SNDSEQ file:

:DeepAlarm

playrepeat alarm1
end

:CutEverything

stopsound silence
end

SNDINFO file:

alarm1 alarm1
silence silence

I wrote this in case somebody may use it. :) I tried it with ACS command "restart" and necessary ACS_Terminate too, but this is much simple.

Thanx 2 everybody who replied to my "thread". :)

Share this post


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