Frictional Games Forum (read-only)

Full Version: [SCRIPT HELP] Music Play Area.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello I need some help with my Custom Map level_01.hps file i written it but then it says expected identifier

void OnStart()
{
AddEntityCollideCallback("Player", "musicareabasement", "MusicPlay", true, 1);

}


MusicPlay("Player", "musicareabasement", 0);

PlayMusic("Music_01.ogg" , true , 10 , 2.0f , 0 , true);

Its my first script ever and that is all that is in the file but at (8,10) and (10,10) it says ERR: Expected Identifier.Exclamation

Can someone please help me?Sad
You have done void OnStart right but you have no syntax or void. Use this:

Quote:void OnStart()
{
AddEntityCollideCallback("Player", "musicareabasement", "MusicPlay", true, 1);

}

void MusicPlay(string &in asParent, string &in asChild, int alState)
{
PlayMusic("Music_01.ogg" , true , 10 , 2.0f , 0 , true);

}

For future reference, post anything that you need help in http://www.frictionalgames.com/forum/forum-39.html
THANK YOU SO MUCH!!! you are a lifesaver and ill take ur advice Big Grin