enderalse/source/scripts/_00e_38e_uniyogoshsc.psc

74 lines
1.6 KiB
Plaintext
Raw Normal View History

Scriptname _00E_38E_UniYogoshSC extends Actor
EVENT OnLoad()
If ((self as Actor) as masterAmbushScript) && (GetLinkedRef() != None)
bIsAmbusher = True
EndIf
If (bIsAmbusher == False) || (GetAV("Variable01") != 0.0) ; Don't start FX if it's ambushing
StartFX()
EndIf
ENDEVENT
Event OnGetUp(ObjectReference akFurniture)
If bIsAmbusher == False
Return
EndIf
StartFX()
If IsDead() == False
GetCombatState()
If GetCombatState() == 0
StartCombat(Game.GetPlayer())
Utility.Wait(0.1)
EndIf
; Force the NPC to requip its spells. Without this it does nothing for some seconds at the start of a fight
Spell mySpell = GetEquippedSpell(1)
If mySpell
UnequipSpell(mySpell, 1)
EndIf
EndIf
EndEvent
Function StartFX()
_00E_FXShadowWispParticleAttach.Play(Self, -1)
EndFunction
EVENT OnDying(Actor akKiller)
Self.SetCriticalStage(Self.CritStage_DisintegrateStart)
if _00E_A1_DevourSoul_DisintegrateFXS != none
_00E_A1_DevourSoul_DisintegrateFXS.play(Self)
endif
utility.wait(2)
Self.AttachAshPile(DefaultAshPileGhostBlack)
if _00E_A1_DevourSoul_DisintegrateFXS != none
_00E_A1_DevourSoul_DisintegrateFXS.stop(Self)
endif
Self.SetAlpha (0.0,True)
_00E_FXShadowWispParticleAttach.Stop(Self)
Self.placeatme(_00E_MAGEldritchShockExplosion)
Self.SetCriticalStage(Self.CritStage_DisintegrateEnd)
ENDEVENT
Activator Property DefaultAshPileGhostBlack Auto
EffectShader Property _00E_A1_DevourSoul_DisintegrateFXS Auto
VisualEffect Property _00E_FXShadowWispParticleAttach Auto
Explosion Property _00E_MAGEldritchShockExplosion Auto
Bool bIsAmbusher