2021-10-05 22:15:58 +00:00
|
|
|
Scriptname _00E_Smoking_AbSmokingSC extends activemagiceffect
|
|
|
|
|
|
|
|
Import Utility
|
|
|
|
Import Debug
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; EVENTS
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Event OnEffectStart(Actor akTarget, Actor akCaster)
|
|
|
|
|
|
|
|
akSelfActor = akTarget as Actor
|
|
|
|
|
|
|
|
If (akSelfActor.HasSpell(_00E_Smoking_abSmoking))
|
2024-01-09 22:00:18 +00:00
|
|
|
; _00E_Debug.PrintMessage("Start smoking.")
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
|
|
|
|
|
|
|
StartSmokingAnimation()
|
|
|
|
|
|
|
|
while !(akSelfActor.IsInCombat()) && (akSelfActor.HasSpell(_00E_Smoking_abSmoking))
|
|
|
|
|
2024-01-09 22:00:18 +00:00
|
|
|
; _00E_Debug.PrintMessage("Loop smoking.")
|
2021-10-05 22:15:58 +00:00
|
|
|
SmokingLoop()
|
|
|
|
|
|
|
|
endwhile
|
|
|
|
|
|
|
|
Self.Dispel()
|
|
|
|
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnEffectFinish(Actor akTarget, Actor akCaster)
|
|
|
|
|
|
|
|
StopSmokingAnimation()
|
|
|
|
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; FUNCTIONS
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Function StartSmokingAnimation()
|
|
|
|
|
|
|
|
akSelfActor.setdontmove(true)
|
|
|
|
SendAnimationEvent(akSelfActor, "WallPipeSmokingEnter")
|
|
|
|
Wait(2.00000)
|
|
|
|
_00E_Smoking_PipeSmokingFlameEffect.Play(akSelfActor, -1 as Float, none)
|
|
|
|
Wait(2.00000)
|
|
|
|
SendAnimationEvent(akSelfActor, "WallPipeSmokingBlaze")
|
|
|
|
_00E_Smoking_PipeSmokingSmokeExhaleEffect.Play(akSelfActor, -1 as Float, none)
|
|
|
|
_00E_Smoking_PipeSmokingFlameEffect.Stop(akSelfActor)
|
|
|
|
Wait(0.40000)
|
|
|
|
_00E_Smoking_PipeSmokingSmokeExhaleEffect.Stop(akSelfActor)
|
|
|
|
Wait(0.40000)
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function SmokingLoop()
|
|
|
|
|
|
|
|
SendAnimationEvent(akSelfActor, "WallPipeSmokingSmokeLoop")
|
|
|
|
Wait(6.00000)
|
|
|
|
_00E_Smoking_PipeSmokingSmokeExhaleEffect.Play(akSelfActor, -1 as Float, none)
|
|
|
|
Wait(2.5)
|
|
|
|
_00E_Smoking_PipeSmokingSmokeExhaleEffect.Stop(akSelfActor)
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function StopSmokingAnimation()
|
|
|
|
|
|
|
|
_00E_Smoking_PipeSmokingSmokeExhaleEffect.Stop(akSelfActor)
|
|
|
|
SendAnimationEvent(akSelfActor, "WallPipeSmokingExit")
|
|
|
|
Wait(1.17000)
|
|
|
|
SendAnimationEvent(akSelfActor, "WallPipeSmokingEnd")
|
|
|
|
akSelfActor.setdontmove(false)
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; PROPERTIES
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Actor akSelfActor
|
|
|
|
|
|
|
|
visualeffect property _00E_Smoking_PipeSmokingFlameEffect auto
|
|
|
|
visualeffect property _00E_Smoking_PipeSmokingSmokeExhaleEffect auto
|
|
|
|
|
|
|
|
Spell Property _00E_Smoking_abSmoking Auto
|
|
|
|
Spell Property _00E_Smoking_abSmokingSitting Auto
|