- Joined
- May 11, 2012
- Messages
- 2,103
How do I damage enemy units once?
Like here: when the dummy comes near enemy, I want to damage the enemy only once, not 33 times...
Like here: when the dummy comes near enemy, I want to damage the enemy only once, not 33 times...
-
Mortal Soul Moving
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer TempInt) from 1 to 5, do (Actions)
-
Loop - Actions
- Set TempPoint = (Position of MortalSoul_Dummy[TempInt])
- Set TempPoint2 = (TempPoint offset by 10.00 towards (Facing of MortalSoul_Dummy[TempInt]) degrees)
- Unit - Move MortalSoul_Dummy[TempInt] instantly to TempPoint2, facing (Facing of MortalSoul_Dummy[TempInt]) degrees
- Set TempUnitGroup = (Units within 200.00 of TempPoint matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is dead) Equal to False) and (((Matching unit) belongs to an enemy of (Owner of MortalSoul_TrigUnit)) Equal to True))))
-
Unit Group - Pick every unit in TempUnitGroup and do (Actions)
-
Loop - Actions
- Unit - Cause MortalSoul_TrigUnit to damage (Picked unit), dealing MortalSoul_DealingDamage damage of attack type Spells and damage type Normal
-
Loop - Actions
- Custom script: call RemoveLocation(udg_TempPoint)
- Custom script: call RemoveLocation(udg_TempPoint2)
- Custom script: call DestroyGroup(udg_TempUnitGroup)
- Custom script: set udg_TempPoint = null
- Custom script: set udg_TempPoint2 = null
- Custom script: set udg_TempUnitGroup = null
-
Loop - Actions
-
For each (Integer TempInt) from 1 to 5, do (Actions)
-
Events