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 Help How to create a sound trigger area?
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#3
RE: How to create a sound trigger area?

continuing with BlueFury, try this. Make a script area where you would like the player to walk into to make the noise. Name it "soundarea" and try this:

//____________________

void OnStart()
{
AddEntityCollideCallback("Player", "soundarea", "sound_func", true, 1);
}

void sound_func(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "SOUNDNAME.SNT", "OBJECT_WHERE_SOUND_OCCURS", 0, true);
}
01-01-2012, 07:58 PM
Find


Messages In This Thread
How to create a sound trigger area? - by Viuffuz - 01-01-2012, 06:49 PM
RE: How to create a sound trigger area? - by Statyk - 01-01-2012, 07:58 PM



Users browsing this thread: 4 Guest(s)