4
Fork 0

Do not start combat music when brawling

development
Eddoursul 3 months ago
parent b67a8ec4d7
commit d7abf2a3aa
  1. BIN
      scripts/_00E_BrawlControl.pex
  2. BIN
      scripts/_00E_CombatMusicControl.pex
  3. 2
      source/scripts/_00E_BrawlControl.psc
  4. 21
      source/scripts/_00E_CombatMusicControl.psc

Binary file not shown.

@ -2,6 +2,8 @@ Scriptname _00E_BrawlControl extends Quest Hidden
Function Brawl(Actor pTarget, Actor pTargetFriend = None)
_00E_PlayerFunctions.GetCombatMusicControl().IsStartingBrawling()
FavorBrawlEvent.SendStoryEvent(None, pTarget, pTargetFriend)
EndFunction

@ -32,9 +32,28 @@ Function InitCombatMusic()
EndIf
EndFunction
function IsStartingBrawling()
bIsBrawling = true
RegisterForSingleUpdate(1.0)
endfunction
event OnUpdate()
bIsBrawling = false
endevent
Event OnCombatStateChange(string eventName, string bTargetIsPlayer, float fCombatState, Form sender)
if bTargetIsPlayer ; start combat or searching
if fCombatState as int == 1 ; combat
if bIsBrawling
bIsBrawling = false
if GetState() == ""
UnregisterForUpdate()
else
StopCombatMusic()
endif
return
endif
; start music
Actor sourceActor = sender as Actor
Int encounterLevel = sourceActor.GetLevel()
@ -205,6 +224,8 @@ Function RemoveCombatSoundtracks()
EndFunction
bool bIsBrawling = false
Keyword Property ActorTypeBoss Auto
GlobalVariable Property PlayerLevel Auto

Loading…
Cancel
Save