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
Music in a certain area
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#8
RE: Music in a certain area

Did you create the grand_hall_area? Also, I mixed up the numbers in StopMusic :X sorry!

The whole script will look like this

void OnStart()
{
AddEntityCollideCallback("Player", "grand_hall_area", "MusicControl", false, 0);

//more of your stuff here
}


void MusicControl(string &in asParent, string &in asChild, int alState)
{
if(alState == 1) PlayMusic("soothingmusicfile.ogg", true, 1.0f, 0, 0, true);
if(alState == -1) StopMusic(2, 0);
}

05-30-2011, 09:20 PM
Find


Messages In This Thread
Music in a certain area - by Greven - 05-28-2011, 08:25 PM
RE: Music in a certain area - by laser50 - 05-28-2011, 08:55 PM
RE: Music in a certain area - by xtron - 05-28-2011, 08:57 PM
RE: Music in a certain area - by Greven - 05-28-2011, 09:25 PM
RE: Music in a certain area - by xtron - 05-28-2011, 09:58 PM
RE: Music in a certain area - by palistov - 05-29-2011, 10:28 AM
RE: Music in a certain area - by Greven - 05-30-2011, 08:55 AM
RE: Music in a certain area - by palistov - 05-30-2011, 09:20 PM



Users browsing this thread: 2 Guest(s)