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


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script File crashing
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#8
RE: Script File crashing

Don't tell me, the StopSound command won't work.

Give the PlaySoundAtEntity a name.

Example:

PlaySoundAtEntity("Sound01", "23_saw2.snt", "Player", 0, false);

Then the StopSound.

StopSound("Sound01", 0);

Try this:

void OnStart()
{
     PlayMusic("amb_guardian.ogg", true, 1, 0, 0, true);
     AddUseItemCallback("", "bone_saw_2", "wooden_boards_block_1", "SawGruntAlert", true);
}
void SawGruntAlert(string &in asItem, string &in asEntity)
{
     SetEntityActive("wooden_boards_block_1", false);
     SetEntityActive("wooden_boards_block_broken_1", true);
     PlaySoundAtEntity("Sound01", "23_saw2.snt", "Player", 0, false);
     AddTimer("", 1.0f, "TimerFunc");
}
void TimerFunc(string &in asTimer)
{
     SetEntityActive("servant_grunt_1", true);
     StopSound("Sound01", 0);
}

(This post was last modified: 05-28-2011, 04:08 PM by Kyle.)
05-28-2011, 04:04 PM
Find


Messages In This Thread
Script File crashing - by willochill - 05-28-2011, 02:28 AM
RE: Script File crashing - by Tanshaydar - 05-28-2011, 02:44 AM
RE: Script File crashing - by willochill - 05-28-2011, 03:31 AM
RE: Script File crashing - by Tanshaydar - 05-28-2011, 11:10 AM
RE: Script File crashing - by willochill - 05-28-2011, 03:58 PM
RE: Script File crashing - by Tanshaydar - 05-28-2011, 03:58 PM
RE: Script File crashing - by willochill - 05-28-2011, 04:00 PM
RE: Script File crashing - by Kyle - 05-28-2011, 04:07 PM
RE: Script File crashing - by Kyle - 05-28-2011, 04:04 PM
RE: Script File crashing - by willochill - 05-28-2011, 04:12 PM



Users browsing this thread: 1 Guest(s)