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?
eagledude4 Offline
Member

Posts: 144
Threads: 14
Joined: Dec 2011
Reputation: 0
#4
RE: How to create a sound trigger area?

(01-01-2012, 07:58 PM)Statyk Wrote: 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);
}

make sure your void sound_func is outside onstart though.


Its hard to see the truth when you've been blinded by lies.
(This post was last modified: 01-01-2012, 09:00 PM by eagledude4.)
01-01-2012, 09:00 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 eagledude4 - 01-01-2012, 09:00 PM



Users browsing this thread: 1 Guest(s)