Hi everyone, this is my first post here. I hope i'm not posting something already existing elsewhere.
But since I couldn't find a solution to this problem earlier, i moved some brain cells to try and do it by myself, and it worked !
So i'm guessing it could help some other folks looking for a simple solution to make the Lightning Shield ability not damage your allies.
First, i set the damage from the ability in the object editor to 0, area of effect to 2. (Duration is up to you but you will have to adapt it in the wait xxx seconds in Trigger 1)
Also i changed the Lightning Shield effect in the effect/enchantment editor to remove the special effect. (You don't want the visual damage effect to apply on allies)
Now i create 2 triggers, one when the spell effect is initiated, and the other one will be a periodic 1 second event. Here is my code :
Trigger 1 :
Have a good day !
But since I couldn't find a solution to this problem earlier, i moved some brain cells to try and do it by myself, and it worked !
So i'm guessing it could help some other folks looking for a simple solution to make the Lightning Shield ability not damage your allies.
First, i set the damage from the ability in the object editor to 0, area of effect to 2. (Duration is up to you but you will have to adapt it in the wait xxx seconds in Trigger 1)
Also i changed the Lightning Shield effect in the effect/enchantment editor to remove the special effect. (You don't want the visual damage effect to apply on allies)
Now i create 2 triggers, one when the spell effect is initiated, and the other one will be a periodic 1 second event. Here is my code :
Trigger 1 :
-
Bouclier de foudre Objet
-
Evénements
-
Unité - A unit Initie l'effet d'une compétence
-
-
Conditions
-
(Ability being cast) Egal à Bouclier de foudre74
-
-
Actions
-
Set Unit_BouclierFoudreCible = (Target unit of ability being cast)
-
Set UnitLanceBouclierFoudre = (Triggering unit)
-
Set BOOL_BouclierFoudreON = TRUE
-
Déclencheur - Turn on Iteration degats bouclier foudre <gen>
-
Wait 15.00 seconds
-
Set BOOL_BouclierFoudreON = FALSE
-
Déclencheur - Turn off Iteration degats bouclier foudre <gen>
-
-
-
Iteration degats bouclier foudre
-
Evénements
-
Temps - Every 1.00 seconds of game time
-
-
Conditions
-
BOOL_BouclierFoudreON Egal à TRUE
-
(Unit_BouclierFoudreCible is alive) Egal à TRUE
-
-
Actions
-
Groupe unité - Pick every unit in (Units in (Region centered at (Position of Unit_BouclierFoudreCible) with size (600.00, 600.00)) matching ((((Matching unit) belongs to an enemy of (Owner of UnitLanceBouclierFoudre)) Egal à TRUE) and ((((Matching unit) is alive) Egal à TRUE) and (((Matchin and do (Actions)
-
Boucle - Actions
-
Unité - Cause UnitLanceBouclierFoudre to damage (Picked unit), dealing (50.00 x (Real((Level of UnitLanceBouclierFoudre)))) damage of attack type Sorts and damage type Foudre
-
Effet spécial - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Orc\LightningShield\LightningShieldBuff.mdl
-
-
-
-
Have a good day !