Jump to content

[LE] Custom Boss Battle Music won't play in game.


SerchBoogie

Recommended Posts

Hi.

 

I have a music track for a custom Boss Fight, it's a 2:28 minutes long .wav file, I created the Music type and Music track in the CK. I created a keyword and put it into my boss NPC. I also put the keyword on the normal combat music, I copied all the settings based on the Dragon Bosses in the vanilla game, but my music won't play during game.

 

What am I doing wrong?. I attached some images with my settings. The file directory is also correct; Data/Music/Combat/song.wav

Link to comment
Share on other sites

Hey, have you tried attaching a script to the boss that plays the custom music?

 

I haven't much messed around with custom music, as I rather just copied an already existing boss from Enderal and just changed the visuals and stats of that Wispmother.

She has a respective script attached.

I cannot recall how the coding looks like, but when I am at home later, I could copy you the PSC file here. :)

Link to comment
Share on other sites

Hey there,

 

here is the script used by Enderal for dynamically switching combat soundtrack:

 

 

Scriptname _00E_CombatSoundtrackScript extends Actor

Event OnUpdate()
    Actor player = Game.GetPlayer()
    If player.IsInCombat()
        RegisterForSingleUpdate(2.0)
    ElseIf Triggered
        Triggered = False
        (player as _00E_PlayerFunctions).StopCombatMusic()
    EndIf
EndEvent

Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
    If !_00E_Music_Combat_Regular
        Debug.Trace(self + ": _00E_Music_Combat_Regular property is empty")
        Return
    EndIf

    If aeCombatState == 1
        Actor player = Game.GetPlayer()
        If akTarget == player
            Int encounterLevel = GetLevel()
            If (PlayerLevel.GetValue() < (encounterLevel + 5)) || encounterLevel >= 30 || HasKeyword(ActorTypeBoss) ; Frage ab ob Gegnerstufe über Spielerstufe oder Boss ist, wenn ja spiele Combatmusic
                If Triggered == False ; player.IsInCombat() &&
                    Triggered = (player as _00E_PlayerFunctions).StartCombatMusic(_00E_Music_Combat_Regular)
                    If Triggered
                        RegisterForSingleUpdate(5.0)
                    EndIf
                EndIf
            EndIf
        EndIf
    EndIf
EndEvent

MusicType Property _00E_Music_Combat_Regular Auto
GlobalVariable Property PlayerLevel Auto
Keyword Property ActorTypeBoss Auto
Bool Triggered = False

 

 

 

I hope this is helping you. :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...