enderalse/scripts/source/_00e_a2_starlingdummypullaggrosc.psc

56 lines
1.4 KiB
Plaintext

Scriptname _00E_A2_StarlingdummyPullAggroSC extends activemagiceffect
;=====================================================================================
; EVENTS
;=====================================================================================
Event OnEffectStart(Actor akTarget, Actor akCaster)
If PutVictimIntoAlias(akTarget)
; good
Else
Return
EndIf
EndEvent
;=====================================================================================
; FUNCTIONS
;=====================================================================================
bool Function PutVictimIntoAlias(Actor iVictim)
int iIndex = A2_Starlingdummy_VictimsArray.Length - 1
bool Filled
while !Filled && iIndex >= 0
iVictimAlias = A2_Starlingdummy_VictimsArray[iIndex]
If iVictimAlias.ForceRefIfEmpty(iVictim)
Filled = True
Else
iIndex -= 1
EndIf
EndWhile
If Filled == True
Return True
Else
Return False
EndIf
EndFunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
ReferenceAlias iVictimAlias
ReferenceAlias Property A2_Starlingdummy_SpiderAlias Auto
ReferenceAlias[] Property A2_Starlingdummy_VictimsArray Auto