• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

3rd attack must do critcal

Status
Not open for further replies.
Level 13
Joined
Aug 19, 2014
Messages
1,111
Hello guys any ideas how to make the 3rd basic attack of a unit will do a critical strike instead? Of course Damage Engine is needed here but, is it possible to force the attack into a critical instead?
 
Level 5
Joined
Nov 21, 2014
Messages
151
Hello guys any ideas how to make the 3rd basic attack of a unit will do a critical strike instead? Of course Damage Engine is needed here but, is it possible to force the attack into a critical instead?

detect damage, add one to a real variable, when it reaches 3 give the unit a custom crit ability with 100% crit, then if it deals damage again, set the variable to 0 and remove the ability. If you don't get it I can make it for you, but this should be pretty straight forward :)

EDIT: you might want to make it for all the colors or it will bug when there are multiple of the same hero, if this is a melee based map ;)
 
Level 5
Joined
Nov 21, 2014
Messages
151
  • detect
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Owner of DamageEventSource) Equal to Player 1 (Red)
      • (DamageEventSource has buff 3rd auto crits (buff)) Equal to True
      • IsDamageSpell Equal to False
    • Actions
      • Unit - Remove Critical Strike (100%) from DamageEventSource
      • Set ThirdAuto = (ThirdAuto + 1.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ThirdAuto Greater than or equal to 2.00
        • Then - Actions
        • Else - Actions
          • Unit - Add Critical Strike (100%) to DamageEventSource
          • Set ThirdAuto = 0.00
There you go
 
Last edited:
Level 5
Joined
Nov 21, 2014
Messages
151
A few suggestions:

Change ThirdAuto to an integer.
What's this? (DamageEventSource has buff 3rd auto crits (buff)) Equal to True
The if runs on 1, 4, 7, etc. Make it compatible with 3(n-1)+x.

I used a buff which is given by the abilitiy (if it is for heroes) what do you mean with 1, 4, 7 etc. ?
 
Status
Not open for further replies.
Top