Enderal SE https://mod.pub/enderal-se/38-enderal-se
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
1.4 KiB
56 lines
1.4 KiB
3 years ago
|
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
|