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 playing in area
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#4
RE: sound playing in area

void OnStart()
{
AddEntityCollideCallback("Player", "ScriptAreaName", "PlayerCollideSound", false, 0);
}

void PlayerCollideSound(string &in asParent, string &in asChild, int alState)
{
if(alState == 1)
{
PlaySoundAtEntity("PlaySound", "SoundFile.snt", "Player", 0.1f, false); //Make sure the extension is .snt at the second argument and you should use PlayMusic if it's a music.
}

else if
{
StopSound("PlaySound", 0.1f);
}
}

"Veni, vidi, vici."
"I came, I saw, I conquered."
06-16-2013, 10:59 AM
Find


Messages In This Thread
sound playing in area - by 39Games - 06-16-2013, 10:30 AM
RE: sound playing in area - by PutraenusAlivius - 06-16-2013, 10:45 AM
RE: sound playing in area - by 39Games - 06-16-2013, 10:52 AM
RE: sound playing in area - by PutraenusAlivius - 06-16-2013, 10:59 AM
RE: sound playing in area - by 39Games - 06-16-2013, 11:06 AM
RE: sound playing in area - by ExpectedIdentifier - 06-16-2013, 11:11 AM
RE: sound playing in area - by 39Games - 06-16-2013, 11:26 AM
RE: sound playing in area - by Adrianis - 06-18-2013, 06:44 PM



Users browsing this thread: 1 Guest(s)