- Joined
- Dec 16, 2017
- Messages
- 418
Hello guys, i am trying to make a spell that heals in some AOE that is represented by a field(as SFX), and i want to give a buff to every unit that enters in the area, and remove the buff when the unit leaves the area but i am not sure how to do it, this is what i got so far without the buff. The spell is based of Silence.
-
Holy Word Sanctify Cast
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Holy Word: Sanctify NEW
-
-
Actions
-
Set HWS_Index = (HWS_Index + 1)
-
Set HWS_Caster[HWS_Index] = (Triggering unit)
-
Set HWS_Target[HWS_Index] = (Target point of ability being cast)
-
Set HWS_Heal[HWS_Index] = (25.00 + (45.00 x (Real((Level of (Ability being cast) for HWS_Caster[HWS_Index])))))
-
Set HWS_Duration[HWS_Index] = 10
-
Unit - Create 1 Dummy Empty for (Owner of HWS_Caster[HWS_Index]) at HWS_Target[HWS_Index] facing 0.00 degrees
-
Set HWS_Dummy[HWS_Index] = (Last created unit)
-
Special Effect - Create a special effect attached to the origin of HWS_Dummy[HWS_Index] using BlessedField.mdx
-
Set HWS_SFX[HWS_Index] = (Last created special effect)
-
Animation - Change HWS_Dummy[HWS_Index]'s size to (150.00%, 150.00%, 150.00%) of its original size
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
HWS_Index Equal to 1
-
-
Then - Actions
-
Trigger - Turn on Holy Word Sanctify Loop <gen>
-
-
Else - Actions
-
-
-
-
Holy Word Sanctify Loop
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer HWS_Loop) from 1 to HWS_Index, do (Actions)
-
Loop - Actions
-
Set HWS_Duration[HWS_Loop] = (HWS_Duration[HWS_Loop] - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
HWS_Duration[HWS_Loop] Greater than or equal to 0
-
-
Then - Actions
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 300.00 of HWS_Target[HWS_Loop]) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is alive) Equal to True
-
((Picked unit) belongs to an ally of (Owner of HWS_Caster[HWS_Loop])) Equal to True
-
-
Then - Actions
-
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + HWS_Heal[HWS_Loop])
-
Special Effect - Create a special effect attached to the chest of (Picked unit) using Abilities\Weapons\FaerieDragonMissile\FaerieDragonMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
Custom script: call RemoveLocation(udg_HWS_Target[udg_HWS_Loop])
-
Unit - Add a 0.10 second Generic expiration timer to HWS_Dummy[HWS_Loop]
-
Special Effect - Destroy HWS_SFX[HWS_Loop]
-
Set HWS_Caster[HWS_Loop] = HWS_Caster[HWS_Index]
-
Set HWS_SFX[HWS_Loop] = HWS_SFX[HWS_Index]
-
Set HWS_Dummy[HWS_Loop] = HWS_Dummy[HWS_Index]
-
Set HWS_Target[HWS_Loop] = HWS_Target[HWS_Index]
-
Set HWS_Duration[HWS_Loop] = HWS_Duration[HWS_Index]
-
Set HWS_Heal[HWS_Loop] = HWS_Heal[HWS_Index]
-
Set HWS_Index = (HWS_Index - 1)
-
Set HWS_Loop = (HWS_Loop - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
HWS_Index Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
-
-
-
-