- Joined
- Jul 25, 2019
- Messages
- 110
I really wish i didnt have to come here for help this often but hey, shows how rocky this learning process is. So, i got this spell called VolcanicArmor (refered to as VA_ in triggers) that deals damage to all enemyes around when the hero is hit at 25% chance, its similiar to axe E from DOTA but it scales with strength. Now, the problem im having here is that it hits ALL units. Owned, Allied, Enemy. All of them. But in the pick units line i added the conditions (owner of attacking unit is enemy with owner of attacked unit) yet the group selector still picks ALL possible units and does the dmg to them. And on top of that, it also spawns the Special Effect boom on units that already died, despite the condition Is alive = True in there. Anyone got any idea how to fix dis?
Here be the Trigger:
Here be the Trigger:
-
VolcanicArmor
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
((Attacked unit) is A Hero) Equal to True
-
((Attacked unit) has buff Volcanic Armor (caster)) Equal to True
-
-
Actions
-
Set VariableSet VA_Chance = (Random integer number between 1 and 100)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
VA_Chance Less than or equal to 25
-
-
Then - Actions
-
Set VariableSet Strength = (Strength of (Attacked unit) (Include bonuses))
-
Set VariableSet RealAttribute = (Real(Strength))
-
Unit Group - Pick every unit in (Units within 300.00 of (Position of (Attacked unit)) matching (((Owner of (Attacking unit)) is an enemy of (Owner of (Attacked unit)).) Equal to True).) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(((Triggering unit) is A structure) Equal to False) and ((((Triggering unit) is alive) Equal to True) and (((Triggering unit) is Magic Immune) Equal to False))
-
-
Then - Actions
-
Special Effect - Create a special effect at (Position of (Picked unit)) using Abilities\Spells\Other\Incinerate\FireLordDeathExplode.mdl
-
Set VariableSet VA_Blast = (Last created special effect)
-
-
Else - Actions
-
Do nothing
-
-
-
-
-
Set VariableSet VA_UnitGroup = (Last created unit group)
-
Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 300.00 at (Position of (Triggering unit)), dealing ((RealAttribute x 0.25) x (Real((Level of Volcanic Armor for (Triggering unit))))) damage of attack type Spells and damage type Fire
-
Wait 0.10 seconds
-
Special Effect - Destroy VA_Blast
-
Unit Group - Remove all units from VA_UnitGroup.
-
Trigger - Turn off (This trigger)
-
Wait 2.00 seconds
-
Trigger - Turn on (This trigger)
-
-
Else - Actions
-
Do nothing
-
-
-
-