Do not start combat music when brawling
This commit is contained in:
parent
b67a8ec4d7
commit
d7abf2a3aa
Binary file not shown.
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…
Reference in New Issue
Block a user