dratiny
New Member
- Reaction score
- 0
Hello,
I am working on a custom spell, and everything is working fine, but the damage system. The spell basically makes the bladesmaster travel in a line (with the spin animation) and destroy any trees / damage any units it encounters in its path (a bit like tryndamere's spinning slash if you ever played LoL).
The trigger is the following one (will fire every 0.03 seconds until the end of the spell.
The problem is, I want the spell to damage each unit only once, and right now it damages them every 0.03 seconds. I don't know what is wrong.
I am working on a custom spell, and everything is working fine, but the damage system. The spell basically makes the bladesmaster travel in a line (with the spin animation) and destroy any trees / damage any units it encounters in its path (a bit like tryndamere's spinning slash if you ever played LoL).
The trigger is the following one (will fire every 0.03 seconds until the end of the spell.
Code:
Set tempUnitGroup = (Units within BS_AoE of tempPoint)
Unit group - Pick every unit in tempUnitGroup and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked unit) is in BS_DamagedUnits[tempInteger]) Equals FALSE
((Picked unit) belongs to an ally of BS_Player[tempInteger]) Equals FALSE
Then - Actions
Unit group - Add (Picked unit) to BS_DamagedUnits[tempInteger]
Unit - Cause BS_Caster[tempInteger] to damage (Picked unit), dealing BS_Damage[tempInteger] damage of attack type Spell and damage type Normal
Custom script: call DestroyGroup(udg_tempUnitGroup)
The problem is, I want the spell to damage each unit only once, and right now it damages them every 0.03 seconds. I don't know what is wrong.