Map music overwrites monster music
Hello, can anybody help me? It's been a week or more that I can't really find the answer to this problem, I play the music of the map and when the monster is activated his music simply won't play, he tries to find me while I am hiding and the map music keeps playing like nothing happened. Also, when I could play the music of the monster the main music didn't go back, I mean, didn't resume to where it was.
Don't know if will help but:
void OnStart()
{
AddEntityCollideCallback("Player","ScriptArea_7","FirstMusic",true,1); AddEntityCollideCallback("Player","ScriptArea_4","SecondMonster",true,1); SetEntityPlayerInteractCallback("note_generic_1","FirstMusic",true);
}
void OnEnter()
{
}
void OnLeave()
{
}
void FirstMusic(string &in asEntity)
{
PlayMusic("03_amb.ogg",true,1.0,0,3.0,false);
}
void SecondMonster(string &in parent, string &in child, int state)
{
GiveSanityDamage(10,true);
SetEntityActive("servant_grunt_1",true);
AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_9",0,"Iddle"); AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_10",0,"Iddle"); AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_11",0,"Iddle"); AddEnemyPatrolNode("servant_grunt_1","PathNodeArea_12",0,"Iddle");
AddEntityCollideCallback("servant_grunt_1","FadeSmoke","FadeSmoke",false,1);
}
//Deactivate the second monster
void FadeSmoke(string &in parent, string &in child, int state)
{
FadeEnemyToSmoke("servant_grunt_1",false);
}
The ScriptArea_7 is only a collision of the player when he comes back to this map.
(This post was last modified: 12-11-2012, 09:56 PM by Saitoshiba.)
|