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
How do I let a sound play ONLY inside an area?
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#2
RE: How do I let a sound play ONLY inside an area?

AddEntityCollideCallback("Player", "AmbienceArea", "MyFunc", false, 0);

void MyFunc(string &in asParent, string &in asChild, int alState)
{
{
if (alState == 1)
{

}
if(alState == -1)
{


}
}
}

When he enters, 1, one type of sounds played and when he leaves, -1 another sound is played.

EDIT: This however does require that you cover the entire area with a single script area.

"What you think is irrelevant" - A character of our time

A Christmas Hunt
(This post was last modified: 09-24-2012, 08:20 PM by i3670.)
09-24-2012, 08:18 PM
Find


Messages In This Thread
RE: How do I let a sound play ONLY inside an area? - by i3670 - 09-24-2012, 08:18 PM



Users browsing this thread: 1 Guest(s)