- Joined
- Jun 6, 2007
- Messages
- 392
I'm working on a simple (or should be) ability called Counter. It gives a chance to block an attack and damage the attacker by the same amount of damage. However, the ability does nothing. If I disable the line "Unit -Cause ...", the damage is blocked properly. Why does that line mess the trigger up? Here's the trigger:
-
Counter
-

Events
-


Game - DamageModifierEvent becomes Equal to 1.00
-
-

Conditions
-


(Level of Counter for DamageEventTarget) Greater than 0
-


DamageEventPhysical Equal to True
-
-

Actions
-


Trigger - Turn off (This trigger)
-


Set TempInt = (5 x (Level of Counter for DamageEventTarget))
-


If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-



If - Conditions
-




(Random integer number between 1 and 100) Less than or equal to TempInt
-
-



Then - Actions
-




Set Damage = DamageEventAmount
-




Set DamageEventAmount = 0.00
-




Floating Text - Create floating text that reads Counter! above DamageEventTarget with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
-




Floating Text - Show (Last created floating text) for (All players)
-




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 3.00 seconds
-




Floating Text - Change the fading age of (Last created floating text) to 3.00 seconds
-




Unit - Cause DamageEventTarget to damage DamageEventSource, dealing Damage damage of attack type Spells and damage type Universal
-
-



Else - Actions
-
-


Trigger - Turn on (This trigger)
-
-
