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 i do this, When i enter a area an music is played
DeathbyNUKE Offline
Junior Member

Posts: 5
Threads: 3
Joined: Sep 2010
Reputation: 0
#1
how i do this, When i enter a area an music is played

someone know how?
10-04-2010, 03:19 AM
Find
Soon Offline
Member

Posts: 50
Threads: 11
Joined: Sep 2010
Reputation: 0
#2
RE: how i do this, When i enter a area an music is played

Start with creating a script area in the editor and name it whatever you want. Like area_music.

Then your script should look something like this:

void OnStart()
{
AddEntityCollideCallback("area_music", "MusicStart");
}


void MusicStart(string &in asParent, string &in asChild, int alState)
{
PlayMusic("04_amb", true, 0.5, 4, 3, true);
}
Make sure the add entity collide callback is in the on start section of your script and the music start function you are calling is outside of On Start, On Enter, and On Leave.
(This post was last modified: 10-04-2010, 03:34 AM by Soon.)
10-04-2010, 03:31 AM
Find




Users browsing this thread: 2 Guest(s)