2021-10-05 22:15:58 +00:00
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:15:58 +00:00
2021-10-05 22:59:59 +00:00
_FS_Phasmalist_ControlQuest Property ControlQuest auto
2021-10-05 22:15:58 +00:00
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:15:58 +00:00
2021-10-05 22:59:59 +00:00
_00E_Phasmalist_FailsaveSummonTwiceControl.setValue(1)
2021-10-05 22:15:58 +00:00
2021-10-05 22:59:59 +00:00
; Summon control is done in _00E_Phasmalist_SummonControl
controlQuest.SummonApparition(Self)
RegisterForSingleUpdate(2)
EndEvent
2021-10-05 22:15:58 +00:00
Event OnUpdate()
_00E_Phasmalist_FailsaveSummonTwiceControl.setValue(0)
2021-10-05 22:59:59 +00:00
Disable()
Delete()
EndEvent