enderalse/scripts/source/_00e_fs_ritualist_summontrackingsc.psc

25 lines
838 B
Plaintext

Scriptname _00E_FS_Ritualist_SummonTrackingSC extends activemagiceffect
GlobalVariable Property _00E_FS_PlayerHasSummonedCreature Auto
Bool bCastByPlayer = True ; True for version compatibility
Event OnEffectStart(Actor akTarget, Actor akCaster)
If akCaster == Game.GetPlayer()
bCastByPlayer = True
_00E_FS_PlayerHasSummonedCreature.Mod(1)
SendModEvent("PlayerSummonCreature")
Else
bCastByPlayer = False
EndIf
Endevent
Event OnEffectFinish(Actor akTarget, Actor akCaster)
If bCastByPlayer
bCastByPlayer = False
_00E_FS_PlayerHasSummonedCreature.Mod(-1)
; SendModEvent("PlayerSummonCreature")
; this function is called instead of using modevents since those do not work when send from inside a oneffectfinish-event
_FS_Phasmalist_ControlQuest.getAffinityControlQuest().OnPlayerCreatureUnsummon()
EndIf
Endevent