Aller au contenu

Photo

Change battle music for a specific battle-and reverting it


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
how would you do it? specific boss battle music, then one returns to default module battle theme? 

#2
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
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);


#3
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
there is a waypoint where the boss spawns, could that be useful?

#4
Leurnid

Leurnid
  • Members
  • 271 messages
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?

#5
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
where should I add FB script?