Hi, I wanted to ask help to you guys about an ability that i'm triggering. The ability works like this:
Sudden Death
When activated, the Hero gains the ability to do a critical strike for a certain number of attacks or until the ability expires. Last 15 seconds.
Level 1 - Critical Strike for one attack.
Level 2 - Critical Strike for two attacks.
Level 3 - Critical Strike for three attacks.
I coded in Gui the critical strike myself, so i won't be using the vanilla passive. The Crit itself works fine, the problem is actually in the fact that the critical strike won't "disappear" after landing the attacks needed to clear the "Sudden Death" buff away, the Hero will continue to Crit until the 15 seconds have passed.
Here, im posting the two triggers that I used to code this ability.
Sudden Death
When activated, the Hero gains the ability to do a critical strike for a certain number of attacks or until the ability expires. Last 15 seconds.
Level 1 - Critical Strike for one attack.
Level 2 - Critical Strike for two attacks.
Level 3 - Critical Strike for three attacks.
I coded in Gui the critical strike myself, so i won't be using the vanilla passive. The Crit itself works fine, the problem is actually in the fact that the critical strike won't "disappear" after landing the attacks needed to clear the "Sudden Death" buff away, the Hero will continue to Crit until the 15 seconds have passed.
Here, im posting the two triggers that I used to code this ability.
-
Critical Strike
-
Events
- Game - DamageModifierEvent becomes Equal to 1.00
-
Conditions
- (DamageEventSource has buff Sudden Death ) Equal to TRUE
-
Actions
- Set Hero = DamageEventSource
- Set Crit_Strike_Number = (Level of Sudden Death (Neutrale-Ostile) for Hero)
- Trigger - Turn on Critical Strike Count <gen>
- Set DamageEventAmount = (DamageEventAmount x 2.00)
- Animation - Reset Hero's animation
- Animation - Play Hero's slam animation
- Floating text - Create floating text that reads (|c00cc0000 + ((String((Integer(DamageEventAmount)))) + (! + |r))) above DamageEventTarget with Z offset 0.00, using font size 11.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
- Floating text - Change (Last created floating text): Turn off 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 2.00 seconds
- Floating text - Set the velocity of (Last created floating text) to 60.00 towards 90.00 degrees
-
Events
-
Critical Strike Count
-
Events
- Game - DamageEventAmount becomes Equal to 1.00
-
Conditions
- (DamageEventSource has buff Sudden Death ) Equal to TRUE
- Crit_Strike_Number Equal or greater then 1
-
Actions
- Set Crit_Strike_Number = (Crit_Strike_Number - 1)
- If (Crit_Strike_Number Equal to 0) then do (Unit* - Remove Sudden Death buff from DamageEventSource) else do (Do nothing)
- Trigger - Turn off (This trigger)
-
Events
Last edited: