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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do i play music on a level?
Prelauncher Offline
Senior Member

Posts: 451
Threads: 11
Joined: May 2011
Reputation: 13
#10
RE: How do i play music on a level?

If you want the music to just play in sertain areas in your map, create a script area so when the player enters the music start



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


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

Socialism (noun): A great way to run out of other people's money.
10-03-2011, 05:11 PM
Find


Messages In This Thread
How do i play music on a level? - by oscar1007 - 10-03-2011, 09:28 AM
RE: How do i play music on a level? - by Prelauncher - 10-03-2011, 05:11 PM
RE: How do i play music on a level? - by ZyLogicX - 10-03-2011, 06:58 PM



Users browsing this thread: 3 Guest(s)