Frictional Games Forum (read-only)
[SCRIPT HELP] Music Play Area. - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: [SCRIPT HELP] Music Play Area. (/thread-12531.html)



[SCRIPT HELP] Music Play Area. - heyitsrobert97 - 01-11-2012

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


RE: [SCRIPT HELP] Music Play Area. - flamez3 - 01-11-2012

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


RE: [SCRIPT HELP] Music Play Area. - heyitsrobert97 - 01-11-2012

THANK YOU SO MUCH!!! you are a lifesaver and ill take ur advice Big Grin