Frictional Games Forum (read-only)
Script won´t work ^^ - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Script won´t work ^^ (/thread-17113.html)



Script won´t work ^^ - Artyom - 07-20-2012

Why won´t this amb work? i´ve tried with different ambs and that works just fine ^^ i´ve tried with both .snt and .ogg but it just don´t seem to work, please help me...
void OnStart ()
{
AddEntityCollideCallback("Player", "kitchen_music", "start_music_dungeon1", true, 1);
}
void start_music_dungeon1(string &in asParent, string &in asChild, int alState)
{
if(alState == 1)
{
StopMusic(3, 1);
PlayMusic("21_amb", true, 0.7, 3, 0, false);
}
}


RE: Script won´t work ^^ - Ongka - 07-20-2012

remove the if statement and add .ogg to the music file.
Code:
void OnStart ()
{
AddEntityCollideCallback("Player", "kitchen_music", "start_music_dungeon1", true, 1);
}

void start_music_dungeon1(string &in asParent, string &in asChild, int alState)
{
StopMusic(3, 1);
PlayMusic("21_amb.ogg", true, 0.7, 3, 0, false);
}



RE: Script won´t work ^^ - Artyom - 07-24-2012

(07-20-2012, 01:54 AM)Ongka Wrote: remove the if statement and add .ogg to the music file.

Code:
void OnStart ()

{

AddEntityCollideCallback("Player", "kitchen_music", "start_music_dungeon1", true, 1);

}



void start_music_dungeon1(string &in asParent, string &in asChild, int alState)

{

StopMusic(3, 1);

PlayMusic("21_amb.ogg", true, 0.7, 3, 0, false);

}



still wont work...


RE: Script won´t work ^^ - Steve - 07-24-2012

I have no idea just a total wild guess (may be retarded) but change the 0 to 0.1 or something.


RE: Script won´t work ^^ - drunkmonk - 07-24-2012

Try changing the false at the end of your play music to true, see if that does anything


RE: Script won´t work ^^ - Artyom - 07-25-2012

this is really strange, it won't work. Could you guys try it out and maybe post you're solution?


RE: Script won´t work ^^ - drunkmonk - 07-25-2012

Does the priority of the StopMusic match with the PlayMusic from the previous map?


RE: Script won´t work ^^ - Artyom - 07-26-2012

(07-25-2012, 01:38 AM)drunkmonk Wrote: Does the priority of the StopMusic match with the PlayMusic from the previous map?
well what the problem is, is that it won't work with that specific sound file. Let's say i switch the 21_amb to 01_amb_darkness and it will work just fine, it's strange isn't it...