Trying to create a spell which adds a special effect to the position (visible and invisible) of all units/heroes in an area around the caster.
Here is the basic idea of the spell I am trying to create.
Hero casts his ability; Detect Life (Based on Immolation, wanted a spell which can be turned on/off)
Hero turns on the spell which drains 25/20/15/10 mana every second. All units within a 1200 radius are given a debuff and have a special effect placed at their position which follows them while they are debuffed.
Once turned off/unit dies/unit no longer has debuff, the special effect is lost. (using "Abilities\Spells\Other\GeneralAuraTarget\GeneralAuraTarget.mdl" as the special effect which follows each unit).
Here is what I have so far as the start for the MUI spell. I just have not managed to work out how what I need to differentiate between each different special effect and their corresponding unit.
Here is the basic idea of the spell I am trying to create.
Hero casts his ability; Detect Life (Based on Immolation, wanted a spell which can be turned on/off)
Hero turns on the spell which drains 25/20/15/10 mana every second. All units within a 1200 radius are given a debuff and have a special effect placed at their position which follows them while they are debuffed.
Once turned off/unit dies/unit no longer has debuff, the special effect is lost. (using "Abilities\Spells\Other\GeneralAuraTarget\GeneralAuraTarget.mdl" as the special effect which follows each unit).
Here is what I have so far as the start for the MUI spell. I just have not managed to work out how what I need to differentiate between each different special effect and their corresponding unit.
-
DetectLifeCast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Detect Life
-
-
Actions
-
Set DetectLife_Index = (DetectLife_Index + 1)
-
Set DetectLife_Cast[DetectLife_Index] = (Casting unit)
-
Set DetectLife_Group[DetectLife_Index] = (Units within 1200.00 of (Position of DetectLife_Cast[DetectLife_Index]) matching (((Matching unit) has buff Detect Life) Equal to True))
-
Set DetectLife_Counter[DetectLife_Index] = 0.00
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
DetectLife_Index Equal to 1
-
-
Then - Actions
-
Trigger - Turn on DetectLifeEffect <gen>
-
-
Else - Actions
-
-
-
-
DetectLifeEffect
-
Events
-
Time - Every 0.25 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer DetectLife_Loop) from 1 to DetectLife_Index, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
DetectLife_Counter[DetectLife_Loop] Greater than or equal to 1.00
-
(DetectLife_Cast[DetectLife_Loop] is dead) Equal to True
-
-
-
-
Then - Actions
-
Set DetectLife_Cast[DetectLife_Loop] = DetectLife_Cast[DetectLife_Index]
-
Set DetectLife_Group[DetectLife_Loop] = DetectLife_Group[DetectLife_Index]
-
Set DetectLife_Counter[DetectLife_Loop] = DetectLife_Counter[DetectLife_Index]
-
Set DetectLife_Loop = (DetectLife_Loop - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
DetectLife_Loop Less than or equal to 0
-
-
Then - Actions
-
Special Effect - Destroy (Last created special effect)
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
Else - Actions
-
Unit Group - Pick every unit in DetectLife_Group[DetectLife_Loop] and do (Actions)
-
Loop - Actions
-
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Other\GeneralAuraTarget\GeneralAuraTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
-
-
-
-
-