Combo Attack - Checking for each attack, not attempted attack

227Minutes

New Member
Reaction score
1
I've made a combo counter sort of skill

It checks for units being attacked, then uses the attacking unit to make the combo effect. The first part is like this:

Trigger:
  • Combo Attack
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has buff Combo Attack ) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • combocounter Greater than 0
        • Then - Actions
          • Countdown Timer - Pause combotimer
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • Set combocounter = (combocounter + 1)
      • Floating Text - Create floating text that reads ((String(combocounter)) + Combo!) above (Attacking unit) with Z offset 0.00, using font size 13.00, color (43.00%, 100.00%, 44.00%), and 30.00% transparency
      • Floating Text - Set the velocity of (Last created floating text) to 18.00 towards 90.00 degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Change the fading age of (Last created floating text) to 0.00 seconds
      • Floating Text - Change the lifespan of (Last created floating text) to 0.50 seconds
      • Countdown Timer - Start combotimer as a One-shot timer that will expire in 3.00 seconds

etc etc.

But the thing is, this doesn't quite work cause the combo counter goes up no matter what happens with the attack command, and it also adds RIGHT when the attack command is issued, so my unit doesnt actually have to follow through the attack. I can just press A then cancel right away. Lol that's so messed up.

Is there some sort of thing that checks for an attack that actually happened (excluding misses) and will be able to be properly timed with the impact of the sword or whatever?

Thank you.
 

Moridin

Snow Leopard
Reaction score
144
What you are referring to is known as a Damage Detection System. This is currently the best way to figuire out when a unit gets hit by another unit rather than just tracking attack commands.
 

Moridin

Snow Leopard
Reaction score
144
Here

Essentially it uses the specific unit event "Unit - a unit takes damage" instead of "Unit - a unit is attacked".
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top