28 lines
971 B
Plaintext
28 lines
971 B
Plaintext
Scriptname _00E_Phasmalist_SummonApparitionSC extends ObjectReference
|
|
; script on the marker that is placed by the apparition summon spell. This summons the apparition at the place the marker has been placed
|
|
|
|
_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
|
|
;this "lock" prevents that both explosions spawn an apparition
|
|
If _00E_Phasmalist_FailsaveSummonTwiceControl.getValue() == 1
|
|
Disable()
|
|
Delete()
|
|
Return
|
|
EndIf
|
|
|
|
_00E_Phasmalist_FailsaveSummonTwiceControl.setValue(1)
|
|
|
|
; Summon control is done in _00E_Phasmalist_SummonControl
|
|
controlQuest.SummonApparition(Self)
|
|
|
|
RegisterForSingleUpdate(2)
|
|
EndEvent
|
|
|
|
Event OnUpdate()
|
|
_00E_Phasmalist_FailsaveSummonTwiceControl.setValue(0)
|
|
Disable()
|
|
Delete()
|
|
EndEvent |