Hello. I'm working on a map project and I want one of the heroes to have a knockback spell, and it works fine once but after the first use it doesn't work properly, because the target isn't knocked back at all. I'm using Bribe's GUI friendly damage detection system. Thank you in advance for any help. 
Here are the triggers:
Here are the triggers:
-
Powershot
-
Events
-
Game - DamageEvent becomes Equal to 1.00
-
-
Conditions
-
(DamageEventTarget has buff Dummy with no visuals (Elihana)) Equal to True
-
(Level of Powershot for DamageEventSource) Greater than or equal to 1
-
-
Actions
-
-------- Set values for knockback trigger --------
-
Set powerShotDistance = (300.00 x 0.04)
-
Set powershotCastLoc = (Position of DamageEventSource)
-
Set powershotLoc = (Position of DamageEventTarget)
-
Set powershotAngle = (Angle from powershotCastLoc to powershotLoc)
-
Set powershotTime = 1.00
-
Custom script: set udg_hashKey = GetHandleId(udg_DamageEventTarget)
-
Hashtable - Save powerShotDistance as (Key distance) of hashKey in powershotTable
-
Hashtable - Save powershotAngle as (Key angle) of hashKey in powershotTable
-
Hashtable - Save powershotTime as (Key time) of hashKey in powershotTable
-
Unit Group - Add DamageEventTarget to powershotGroup
-
-------- Damage --------
-
Set tempReal = (Real((Agility of rangerGeneral (Include bonuses))))
-
Floating Text - Create floating text that reads (String((Integer(tempReal)))) at powershotLoc with Z offset 0.00, using font size 8.00, color (100.00%, 1.00%, 1.00%), and 0.00% transparency
-
Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
-
Floating Text - Change (Last created floating text): Disable permanence
-
Floating Text - Change the lifespan of (Last created floating text) to 1.50 seconds
-
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
-
Trigger - Turn off (This trigger)
-
Unit - Cause DamageEventSource to damage DamageEventTarget, dealing tempReal damage of attack type Hero and damage type Normal
-
Trigger - Turn on (This trigger)
-
Custom script: call RemoveLocation( udg_powershotLoc )
-
Custom script: call RemoveLocation( udg_powershotCastLoc )
-
-
-
Powershot Loop
-
Events
-
Time - Every 0.04 seconds of game time
-
-
Conditions
-
Actions
-
Unit Group - Pick every unit in powershotGroup and do (Actions)
-
Loop - Actions
-
Set powerShotDistance = (Load (Key distance) of (Key (Picked unit)) from powershotTable)
-
Set powershotAngle = (Load (Key angle) of (Key (Picked unit)) from powershotTable)
-
Set powershotTime = (Load (Key time) of (Key (Picked unit)) from powershotTable)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
powershotTime Greater than 0.00
-
-
Then - Actions
-
Set tempLoc = (Position of (Picked unit))
-
Set powerShotLoc = (tempLoc offset by powerShotDistance towards powershotAngle degrees)
-
Unit - Move (Picked unit) instantly to powershotLoc
-
Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
-
Special Effect - Destroy (Last created special effect)
-
Hashtable - Save (powershotTime - 0.04) as (Key time) of (Key (Picked unit)) in powershotTable
-
Custom script: call RemoveLocation( udg_tempLoc )
-
Custom script: call RemoveLocation( udg_powershotLoc )
-
-
Else - Actions
-
Hashtable - Clear all child hashtables of child (Key (Picked unit)) in powershotTable
-
Unit Group - Remove (Picked unit) from powershotGroup
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in powershotGroup) Equal to 0
-
-
Then - Actions
-
Custom script: call DestroyGroup( udg_powershotGroup )
-
-
Else - Actions
-
-
-
-
-
-
-
Last edited: