The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Script Help Sound not activating upon collision
Saitoshiba Offline
Junior Member

Posts: 7
Threads: 2
Joined: Dec 2012
Reputation: 0
#1
Sound not activating upon collision

My script file looks fine, but when the player enters on the scrip area the effect of losing sanity happens( usually don't) but the sound doesn't play. The other room that has the exact same thing plays the sound perfectly.


void OnStart()
{

AddEntityCollideCallback("Player","ScriptArea_8","Torture1",true,0);
AddEntityCollideCallback("Player","ScriptArea_10","Torture2",true,0);
}


void OnEnter()
{

}

void OnLeave()
{
}

// The collision that it is working perfectly

void Torture1(string &in parent, string &in child, int state)
{
GiveSanityDamage(0,true);
PlaySoundAtEntity("Burn1","24_burn.snt","Player",0,false);
}

void Torture2(string &in parent, string &in child, int state)
{
GiveSanityDamage(0,true);
PlaySoundAtEntity("Saw","23_saw2.snt","Player",0,false);
PlaySoundAtEntity("SawVoice","23_saw_voice2.snt","Player",0,false);
}

Can somebody help me?
12-11-2012, 09:54 PM
Find


Messages In This Thread
Sound not activating upon collision - by Saitoshiba - 12-11-2012, 09:54 PM



Users browsing this thread: 1 Guest(s)