Hadezown
TH.net Regular
- Reaction score
- 5
I have 2 triggers, in the first one an ability is cast which causes a 'snowball' projectile (a locust unit) to move. Then in the second trigger if a unit comes within range of the projectile it takes damaged. Ive already done the move trigger but im have problems with the 'unit within range' trigger. More than one player can use this ability.
Trigger1:
Trigger2 (Fsnowball hit)
The Actual Problem:
This trigger works pretty great except that if there is more than one snowball being thrown at the same time, the unit within range of a player's snowball will take damage from that snowball AND all of his allie's snowballs, if they exist.
I tried using a condition 'snowball is in (within range of triggering unit)' . but i think because its a locust unit it doesnt work..
Anyone have a solution for this?
Trigger1:
Code:
Events
Unit - A unit Starts the effect of an ability
Actions
Unit - Create 1 SnowBall for (Owner of (Triggering unit)) at AA_Point facing Default building facing degrees
Set Snowball_unit[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
Trigger - Add to Fsnowball hit <gen> the event (Unit - A unit comes within 50.00 of Snowball_unit[(Player number of (Owner of (Triggering unit)))])
Trigger2 (Fsnowball hit)
Code:
Actions
For each (Integer Hit_Integer) from 1 to 8, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) belongs to an enemy of (Owner of Snowball_unit[Hit_Integer])) Equal to True
Then - Actions
Unit - Cause Snowball_unit[Hit_Integer] to damage (Triggering unit), dealing (50.00 + (25.00 x (Real((Level of Fast Snowball for Snowball_caster[Hit_Integer]))))) damage of attack type Chaos and damage type Normal
Else - Actions
The Actual Problem:
This trigger works pretty great except that if there is more than one snowball being thrown at the same time, the unit within range of a player's snowball will take damage from that snowball AND all of his allie's snowballs, if they exist.
I tried using a condition 'snowball is in (within range of triggering unit)' . but i think because its a locust unit it doesnt work..
Anyone have a solution for this?