how would you do it? specific boss battle music, then one returns to default module battle theme?
Change battle music for a specific battle-and reverting it
Débuté par
Dark_Ansem
, mai 29 2012 03:06
#1
Posté 29 mai 2012 - 03:06
#2
Posté 29 mai 2012 - 03:32
I'd likely do something like this:
// Call this before the battle with the boss starts.
void main()
{
object oArea = GetArea (OBJECT_SELF);
int nBattle = MusicBackgroundGetBattleTrack (oArea);
// Store it on the area for reverting later.
SetLocalInt (oArea, "NORMAL_BATTLE_TRACK", nBattle);
int nTrack = 1; // Track number to use here.
MusicBattleChange (oArea, nTrack);
}
// Call this routine from the bosses OnDeath script, or just copy those three lines into it.
void RevertMusic ()
{
object oArea = GetArea (OBJECT_SELF);
int nTrack = GetLocalInt (oArea, "NORMAL_BATTLE_TRACK");
MusicBattleChange (oArea, nTrack);
}
// Call this before the battle with the boss starts.
void main()
{
object oArea = GetArea (OBJECT_SELF);
int nBattle = MusicBackgroundGetBattleTrack (oArea);
// Store it on the area for reverting later.
SetLocalInt (oArea, "NORMAL_BATTLE_TRACK", nBattle);
int nTrack = 1; // Track number to use here.
MusicBattleChange (oArea, nTrack);
}
// Call this routine from the bosses OnDeath script, or just copy those three lines into it.
void RevertMusic ()
{
object oArea = GetArea (OBJECT_SELF);
int nTrack = GetLocalInt (oArea, "NORMAL_BATTLE_TRACK");
MusicBattleChange (oArea, nTrack);
}
#3
Posté 29 mai 2012 - 03:43
there is a waypoint where the boss spawns, could that be useful?
#4
Posté 31 mai 2012 - 07:37
Assuming the boss is spawned just prior to the fight, F.B's script added to the On-Spawn of the boss would work.
...or, you could paint a big trigger in the room or vicinity of the boss with the On-Enter set to F.B's script, and the second script snippet could be both the boss' on-death, and the trigger's on-exit, and then add a routine to the boss' on-death to destroy the trigger?
...or, you could paint a big trigger in the room or vicinity of the boss with the On-Enter set to F.B's script, and the second script snippet could be both the boss' on-death, and the trigger's on-exit, and then add a routine to the boss' on-death to destroy the trigger?
#5
Posté 31 mai 2012 - 08:11
where should I add FB script?





Retour en haut







