- Joined
- Dec 25, 2018
- Messages
- 110
I want to make a passive ability which makes following after attacking:
-Heals hero based on fixed value + STR bonus (WORKS)
-Creates Special effect on hero while attacking. (WORKS)
-Creates unit group of friendly nearby units near our hero. (DOESN'T WORK)
-Heals units around that hero for fixed value + STR bonus (DOESN'T WORK)
-Creates Special effect on nearby units while attacking. (WORKS)
Theres problem only in Action section
-I tried storing hero's str etc in local variable but still units nearby didn't get healed, although if I set it to PickedUnitHp+(PickedUnitHp+20) then they will get healed for 20hp.
-If I put 'Destroy last effect created' after the second effect, then it doesn't appear at all.
-I can't detect allied units, I tried something like this:
-Heals hero based on fixed value + STR bonus (WORKS)
-Creates Special effect on hero while attacking. (WORKS)
-Creates unit group of friendly nearby units near our hero. (DOESN'T WORK)
-Heals units around that hero for fixed value + STR bonus (DOESN'T WORK)
-Creates Special effect on nearby units while attacking. (WORKS)
Theres problem only in Action section
-
Judgment
-

Events
-


Game - GDD_Event becomes Equal to 0.00
-
-

Conditions
-


(Unit-type of GDD_DamageSource) Equal to Paladin
-


(GDD_DamageSource has buff Judgment of Light ) Equal to True
-
-

Actions
-


Custom script: local unit udg_LocalUnit
-


Custom script: local location udg_LocalPoint
-


Custom script: local group udg_LocalGroup
-


Set LocalUnit = GDD_DamageSource
-


Set LocalPoint = (Position of LocalUnit)
-


Set LocalGroup = (Units within (150.00 + ((Real((Level of Judgment of Light for LocalUnit))) x 100.00)) of (Position of LocalUnit))
-


Special Effect - Create a special effect attached to the origin of LocalUnit using Abilities\Spells\Human\Heal\HealTarget.mdl
-


Unit - Set life of LocalUnit to (((Real((Strength of LocalUnit (Include bonuses)))) / 4.00) + ((Life of LocalUnit) + ((Real((Level of Judgment of Light for LocalUnit))) x 5.00)))
-


Special Effect - Destroy (Last created special effect)
-


Unit Group - Pick every unit in LocalGroup and do (Actions)
-



Loop - Actions
-




Unit - Set life of (Picked unit) to (((Real((Strength of LocalUnit (Include bonuses)))) / 4.00) + ((Life of (Picked unit)) + ((Real((Level of Judgment of Light for LocalUnit))) x 5.00)))
-




Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Heal\HealTarget.mdl
-
-
-


Custom script: set udg_LocalUnit = null
-


Custom script: call RemoveLocation(udg_LocalPoint)
-


Custom script: call DestroyGroup(udg_LocalGroup)
-
-
-I tried storing hero's str etc in local variable but still units nearby didn't get healed, although if I set it to PickedUnitHp+(PickedUnitHp+20) then they will get healed for 20hp.
-If I put 'Destroy last effect created' after the second effect, then it doesn't appear at all.
-I can't detect allied units, I tried something like this:
-
Unit Group - Pick every unit in LocalGroup and do (Actions)
-

Loop - Actions
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




((Picked unit) belongs to an ally of (Owner of LocalUnit)) Equal to True
-
-



Then - Actions
-




Unit - Set life of (Picked unit) to (((Real((Strength of LocalUnit (Include bonuses)))) / 4.00) + ((Life of (Picked unit)) + ((Real((Level of Judgment of Light for LocalUnit))) x 5.00)))
-




Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Heal\HealTarget.mdl
-
-



Else - Actions
-
-
-

