R
Ruination
Guest
So I've made an ability with a chance to blink behind an enemy and you know...tear it a new one. One little detail remains, and that is that I don't want him doing more than one of these at a time, so that the animations are cut short. I want to limit it so that it isn't triggered again while the animation for the current one is still playing. How can I do that?
Here's the trigger...and thanks.
Here's the trigger...and thanks.
Code:
Evasive Strikes
Events
Unit - A unit Is attacked
Conditions
(Random integer number between 1 and 20) Less than or equal to 1
Actions
Set EvadedTarget = (Attacking unit)
Set EvasiveStriker = (Attacked unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Level of Evasive Strikes [evasion] for EvasiveStriker) Equal to 1
Then - Actions
Wait 0.10 seconds
Unit - Pause EvasiveStriker
Unit - Pause EvadedTarget
Unit - Add Evasion Strikes Crit and Evade to EvasiveStriker
Unit - Set Level of Evasion Strikes Crit and Evade for EvasiveStriker to (Level of Evasive Strikes [evasion] for EvasiveStriker)
Special Effect - Create a special effect attached to the origin of EvasiveStriker using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
Unit - Move EvasiveStriker instantly to ((Position of EvadedTarget) offset by 90.00 towards ((Facing of EvadedTarget) - 180.00) degrees), facing (Position of EvadedTarget)
Animation - Play EvasiveStriker's attack slam animation
Wait 0.70 seconds
Unit - Order (Attacked unit) to damage (Attacking unit) for 1000.00 using attack type Hero and damage type Universal.
Special Effect - Create a special effect attached to the origin of EvadedTarget using Objects\Spawnmodels\Human\HumanBlood\HumanBloodLarge0.mdl
Unit - Remove Evasion Strikes Crit and Evade from EvasiveStriker
Unit - Unpause EvadedTarget
Unit - Unpause EvasiveStriker
Animation - Reset EvasiveStriker's animation
Else - Actions
Do nothing


