DeathbyNUKE
Junior Member
Posts: 5
Joined: Sep 2010
Reputation: 0
|
how i do this, When i enter a area an music is played
someone know how?
|
|
| 10-04-2010 03:19 AM |
|
Soon
Junior Member
Posts: 43
Joined: Sep 2010
Reputation: 0
|
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 |
|