enderalse/source/scripts/_00e_phasmalist_summonapparitionsc.psc

28 lines
971 B
Plaintext
Raw Normal View History

Scriptname _00E_Phasmalist_SummonApparitionSC extends ObjectReference
2021-10-05 22:59:59 +00:00
; script on the marker that is placed by the apparition summon spell. This summons the apparition at the place the marker has been placed
2021-10-05 22:59:59 +00:00
_FS_Phasmalist_ControlQuest Property ControlQuest auto
GlobalVariable Property _00E_Phasmalist_FailsaveSummonTwiceControl auto
Event OnInit()
;because sometimes a projectile does not spawn its explosion correctly, the explosion is placed twice, once by the magic effect and once by the projectile
2021-10-05 22:59:59 +00:00
;this "lock" prevents that both explosions spawn an apparition
If _00E_Phasmalist_FailsaveSummonTwiceControl.getValue() == 1
Disable()
Delete()
Return
EndIf
2021-10-05 22:59:59 +00:00
_00E_Phasmalist_FailsaveSummonTwiceControl.setValue(1)
2021-10-05 22:59:59 +00:00
; Summon control is done in _00E_Phasmalist_SummonControl
controlQuest.SummonApparition(Self)
RegisterForSingleUpdate(2)
EndEvent
Event OnUpdate()
_00E_Phasmalist_FailsaveSummonTwiceControl.setValue(0)
2021-10-05 22:59:59 +00:00
Disable()
Delete()
EndEvent