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
39Games Offline
Junior Member

Posts: 48
Threads: 14
Joined: Jan 2013
Reputation: 0
#7
RE: sound playing in area

(06-16-2013, 11:11 AM)sonataarctica Wrote:
(06-16-2013, 11:06 AM)39Gamer Wrote: it crashed at
else if
{

Just use else, not else if.
i experimented and this code appears to work, thanks for the rest of the code Smile

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

void PlayerCollideSound(string &in asParent, string &in asChild, int alState)
{
if(alState == 1)
{
PlaySoundAtEntity("PlaySound", "Sound.snt", "Player", 0.0f, true);
}

if(alState == -1)
{
StopSound("PlaySound", 0.0f);
}
}

06-16-2013, 11:26 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)