- Joined
- Jun 22, 2004
- Messages
- 109
hey guys ive been having problems with this specific spell i made...its a passive ability but in a certain area of my map...even though nothing is attacking the unit, the ability will trigger...i want to fix this and make it so that the ability only triggers when the unit is hit...here is my code....
Counter Blade
Events
Unit - A unit Is attacked
Conditions
(Level of Counter Blade for (Attacked unit)) Greater than or equal to 1
Actions
If (((Attacked unit) is an illusion) Equal to True) then do (Skip remaining actions) else do (Do nothing)
If ((Percentage life of (Attacked unit)) Greater than or equal to 100.00) then do (Skip remaining actions) else do (Do nothing)
If ((Unit-type of (Attacked unit)) Equal to Blade master Dummy) then do (Skip remaining actions) else do (Do nothing)
If ((Attacking unit) Equal to (Summoned unit)) then do (Skip remaining actions) else do (Do nothing)
If (((Attacking unit) is A ranged attacker) Equal to True) then do (Skip remaining actions) else do (Do nothing)
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 5
Then - Actions
Unit - Create 1 Blade master Dummy for (Owner of (Attacked unit)) at (Position of (Attacked unit)) facing Default building facing degrees
Animation - Change (Last created unit)'s vertex coloring to (0.00%, 100.00%, 100.00%) with 50.00% transparency
Unit - Add a 7.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Orc Blademaster - Bladestorm
Else - Actions
Do nothing
Counter Blade
Events
Unit - A unit Is attacked
Conditions
(Level of Counter Blade for (Attacked unit)) Greater than or equal to 1
Actions
If (((Attacked unit) is an illusion) Equal to True) then do (Skip remaining actions) else do (Do nothing)
If ((Percentage life of (Attacked unit)) Greater than or equal to 100.00) then do (Skip remaining actions) else do (Do nothing)
If ((Unit-type of (Attacked unit)) Equal to Blade master Dummy) then do (Skip remaining actions) else do (Do nothing)
If ((Attacking unit) Equal to (Summoned unit)) then do (Skip remaining actions) else do (Do nothing)
If (((Attacking unit) is A ranged attacker) Equal to True) then do (Skip remaining actions) else do (Do nothing)
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 5
Then - Actions
Unit - Create 1 Blade master Dummy for (Owner of (Attacked unit)) at (Position of (Attacked unit)) facing Default building facing degrees
Animation - Change (Last created unit)'s vertex coloring to (0.00%, 100.00%, 100.00%) with 50.00% transparency
Unit - Add a 7.00 second Generic expiration timer to (Last created unit)
Unit - Order (Last created unit) to Orc Blademaster - Bladestorm
Else - Actions
Do nothing