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
Is there a way to stop a looping sound?
User01 Offline
Member

Posts: 97
Threads: 30
Joined: Feb 2013
Reputation: 0
#5
RE: Is there a way to stop a looping sound?

I'll give you an example.

void OnStart()
{
PlaySoundAtEntity("sound1","sound1.snt","area_sound", 0, true);
AddUseItemCallback("", "item", "area_event", "event", true);
}

void event(string &in asItem, string &in asEntity)
{
StopSound("sound1", 0.1f);
PlaySoundAtEntity("", "sound3.snt", "Player", 0, false);
PlaySoundAtEntity("sound2", "sound2.snt", "area_sound", 0, false);
PlayPropAnimation("object", "animation", 0, false, "event2");
RemoveItem("item");
}

void event2(string asProp)
{
StopSound("sound2", 0.1f);
}
Both sound1 and sound2 keep playing in my script.
03-27-2018, 04:22 PM
Find


Messages In This Thread
RE: Is there a way to stop a looping sound? - by User01 - 03-27-2018, 04:22 PM



Users browsing this thread: 1 Guest(s)