Frictional Games Forum (read-only)

Full Version: Script won´t work ^^
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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);
}
}
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);
}
(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...
I have no idea just a total wild guess (may be retarded) but change the 0 to 0.1 or something.
Try changing the false at the end of your play music to true, see if that does anything
this is really strange, it won't work. Could you guys try it out and maybe post you're solution?
Does the priority of the StopMusic match with the PlayMusic from the previous map?
(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...