- Joined
- Mar 27, 2008
- Messages
- 8,035
Hey there, folks !
I've got problems over here, you see this trigger:
This trigger will picks up any enemy unit by 150 AOE and damages that unit ONCE per cast
Let's say 2 unit cast at 1 unit at the same time (well, kinda like 0.30 seconds interval), Unit A will of course damage once that unit (that unit is in DamagedGroup), but how do Unit B wants to damage that unit if that unit is still in the group ?
If I immediately remove that unit from that group after damaging it, the next 0.03 second will damage that unit again, causing like 3~5 times of damage to that enemy unit before 150 goes away out of range
So, how do I know for each unit, differs from other, and successfully damages that unit 1 time per cast ?
I've got problems over here, you see this trigger:
-
Untitled Trigger 001
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in CasterGroup and do (Actions)
-
Loop - Actions
-
Set Picked = (Picked unit)
-
Set PickedLoc = (Position of Picked)
-
Set MoveLoc = (PickedLoc offset by 25.00 towards (Facing of (Picked unit)) degrees)
-
Unit - Move (Picked unit) instantly to MoveLoc
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 150.00 of MoveLoc matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Picked unit))) Equal to True))) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Picked unit) is in DamagedGroup) Equal to True
-
-
Then - Actions
-
Else - Actions
-
Unit - Cause Picked to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Normal
-
Unit Group - Add (Picked unit) to DamagedGroup
-
-
-
-
-
Custom script: call RemoveLocation(udg_PickedLoc)
-
Custom script: call RemoveLocation(udg_MoveLoc)
-
-
-
-
This trigger will picks up any enemy unit by 150 AOE and damages that unit ONCE per cast
Let's say 2 unit cast at 1 unit at the same time (well, kinda like 0.30 seconds interval), Unit A will of course damage once that unit (that unit is in DamagedGroup), but how do Unit B wants to damage that unit if that unit is still in the group ?
If I immediately remove that unit from that group after damaging it, the next 0.03 second will damage that unit again, causing like 3~5 times of damage to that enemy unit before 150 goes away out of range
So, how do I know for each unit, differs from other, and successfully damages that unit 1 time per cast ?