Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sound doesn't fade (Solved)
Cataclysm Offline
Junior Member

Posts: 25
Threads: 3
Joined: Jan 2011
Reputation: 0
#3
RE: Sound doesn't fade...

(01-08-2011, 09:34 PM)Frontcannon Wrote: Seems like that is a looped sound. Use StopSound or edit the .snt file itself.

I tried it. I'm very confused as to how to do it. When i put StopSound in to the same block as the initial sound, the sound doesn't play. That makes sense i guess. So I just tried like 30 minutes of experimenting and came up with something that looks like this.

void PlayCreepySound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "scare_steps_big.snt", "ScriptArea_1", 0, false);
StartScreenShake(0.3, 4, 2, 2);
PlaySoundAtEntity("Rocks1", "general_rock_rumble.snt", "ScriptArea_1", 0, false);
AddTimer("Rocks1", 2.0f, "StopCreepySound");
}

void StopCreepySound(string &in asTimer)
{
StopSound("general_rock_rumble.snt", 2.0f);
}

My idea when i did this was to put the timer in so that it would delay the next block from being executed, so the sound would play then get stopped. But the stop sound wasn't executed. The sound continues to loop. If you can explain how the script would look it would be greatly appreciated.

If guns don't kill people, People kill people. Then toasters don't toast toast, Toast toast toast

[Image: 2b5wu9.png]

01-09-2011, 12:24 AM
Find


Messages In This Thread
Sound doesn't fade (Solved) - by Cataclysm - 01-08-2011, 09:33 PM
RE: Sound doesn't fade... - by Frontcannon - 01-08-2011, 09:34 PM
RE: Sound doesn't fade... - by Cataclysm - 01-09-2011, 12:24 AM
RE: Sound doesn't fade... - by Frontcannon - 01-09-2011, 12:48 AM
RE: Sound doesn't fade... - by Cataclysm - 01-09-2011, 01:34 AM



Users browsing this thread: 1 Guest(s)