• 🏆 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!

Combo System

Status
Not open for further replies.
Level 19
Joined
Apr 21, 2013
Messages
1,194
Here's the combo system I've made, I am planning to improve this but right now it's only for 6 combos and nothing more. 6 three hit combos.

Q means Quick Attack and E means Heavy Attack

The system check the first pressed attack, and starts a timer, quick timer if quick attack used and heavy timer if heavy used, if the next attack is a valid combo and is pressed in the given time the next move of the combo is executed. Else it is just the first move of possible combos.

I had to keep count of E and Q when they are pressed. And a combo count to check if the moves are a part of the combo.

If the timer runs out, every counters are reset to 0.

The only thing I don't like about this system is, it is executed instantly, I wll have to find a way to interrupt the attackers if they are attacked first.

This system is not MUI, and is not intended to be.




  • QuickComboTimer
    • Events
    • Conditions
    • Actions
      • Countdown Timer - Start comboQuickTimer as a One-shot timer that will expire in 1.00 seconds
  • QuickTimerChecker
    • Events
      • Time - comboQuickTimer expires
    • Conditions
    • Actions
      • Set Qcounter = 0
      • Set Ecounter = 0
      • Set comboCounter = 0
      • Custom script: call RemoveLocation(udg_QcasterLoc)
      • Custom script: call RemoveLocation(udg_attackTarget)
  • Q
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Quick Attack
          • Qcounter Equal to 0
          • Ecounter Equal to 0
          • comboCounter Equal to 0
    • Actions
      • Wait 0.00 seconds
      • -------- SET CASTER AND LOCATIONS --------
      • Set Qcaster = (Triggering unit)
      • Set QcasterLoc = (Position of Qcaster)
      • Set attackTarget = (QcasterLoc offset by 55.00 towards (Facing of Qcaster) degrees)
      • -------- SET COUNTERS --------
      • Set Qcounter = (Qcounter + 1)
      • Set comboCounter = (comboCounter + 1)
      • -------- START TIMER --------
      • Trigger - Run QuickComboTimer <gen> (ignoring conditions)
      • -------- PLAY ANIMATION --------
      • Custom script: call SetUnitAnimationByIndex(udg_Qcaster, 78)
      • -------- DECREASE ENERGY/STAMINA --------
      • Unit - Set mana of Qcaster to ((Mana of Qcaster) - 10.00)
      • -------- IMPACT DAMAGE --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 125.00 of attackTarget) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of Qcaster)) Equal to True
            • Then - Actions
              • Unit - Cause Qcaster to damage (Picked unit), dealing 30.00 damage of attack type Normal and damage type Normal
            • Else - Actions

  • QQ
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Quick Attack
          • Qcounter Equal to 1
          • Ecounter Equal to 0
          • comboCounter Equal to 1
          • (Remaining time for comboQuickTimer) Greater than 0.00
    • Actions
      • Wait 0.00 seconds
      • -------- SET CASTER AND LOCATIONS --------
      • Set Qcaster = (Triggering unit)
      • Set QcasterLoc = (Position of Qcaster)
      • Set attackTarget = (QcasterLoc offset by 55.00 towards (Facing of Qcaster) degrees)
      • -------- SET COUNTERS --------
      • Set Qcounter = (Qcounter + 1)
      • Set comboCounter = (comboCounter + 1)
      • -------- START TIMER --------
      • Trigger - Run QuickComboTimer <gen> (ignoring conditions)
      • -------- PLAY ANIMATION --------
      • Custom script: call SetUnitAnimationByIndex(udg_Qcaster, 79)
      • -------- DECREASE ENERGY/STAMINA --------
      • Unit - Set mana of Qcaster to ((Mana of Qcaster) - 10.00)
      • -------- IMPACT DAMAGE --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 125.00 of attackTarget) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of Qcaster)) Equal to True
            • Then - Actions
              • Unit - Cause Qcaster to damage (Picked unit), dealing 30.00 damage of attack type Normal and damage type Normal
            • Else - Actions
  • QQQ
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Quick Attack
          • Qcounter Equal to 2
          • Ecounter Equal to 0
          • comboCounter Equal to 2
          • (Remaining time for comboQuickTimer) Greater than 0.00
    • Actions
      • Wait 0.00 seconds
      • -------- SET CASTER AND LOCATIONS --------
      • Set Qcaster = (Triggering unit)
      • Set QcasterLoc = (Position of Qcaster)
      • Set attackTarget = (QcasterLoc offset by 55.00 towards (Facing of Qcaster) degrees)
      • -------- SET COUNTERS --------
      • Set Qcounter = 0
      • Set comboCounter = 0
      • -------- START TIMER --------
      • Trigger - Run QuickComboTimer <gen> (ignoring conditions)
      • -------- PLAY ANIMATION --------
      • Custom script: call SetUnitAnimationByIndex(udg_Qcaster, 77)
      • -------- DECREASE ENERGY/STAMINA --------
      • Unit - Set mana of Qcaster to ((Mana of Qcaster) - 10.00)
      • -------- IMPACT DAMAGE --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 125.00 of attackTarget) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of Qcaster)) Equal to True
            • Then - Actions
              • Unit - Cause Qcaster to damage (Picked unit), dealing 30.00 damage of attack type Normal and damage type Normal
            • Else - Actions
  • QQE
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Heavy Attack
          • Qcounter Equal to 2
          • Ecounter Equal to 0
          • comboCounter Equal to 2
          • (Remaining time for comboQuickTimer) Greater than 0.00
    • Actions
      • Wait 0.00 seconds
      • -------- SET CASTER AND LOCATIONS --------
      • Set Qcaster = (Triggering unit)
      • Set QcasterLoc = (Position of Qcaster)
      • Set attackTarget = (QcasterLoc offset by 55.00 towards (Facing of Qcaster) degrees)
      • -------- SET COUNTERS --------
      • Set Qcounter = 0
      • Set comboCounter = 0
      • -------- START TIMER --------
      • Trigger - Run QuickComboTimer <gen> (ignoring conditions)
      • -------- PLAY ANIMATION --------
      • Custom script: call SetUnitAnimationByIndex(udg_Qcaster, 80)
      • -------- DECREASE ENERGY/STAMINA --------
      • Unit - Set mana of Qcaster to ((Mana of Qcaster) - 25.00)
      • -------- IMPACT DAMAGE --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 125.00 of attackTarget) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of Qcaster)) Equal to True
            • Then - Actions
              • Unit - Cause Qcaster to damage (Picked unit), dealing 45.00 damage of attack type Normal and damage type Normal
            • Else - Actions
  • QE
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Heavy Attack
          • Qcounter Equal to 1
          • Ecounter Equal to 0
          • comboCounter Equal to 1
          • (Remaining time for comboQuickTimer) Greater than 0.00
    • Actions
      • Wait 0.00 seconds
      • -------- SET CASTER AND LOCATIONS --------
      • Set Qcaster = (Triggering unit)
      • Set QcasterLoc = (Position of Qcaster)
      • Set attackTarget = (QcasterLoc offset by 55.00 towards (Facing of Qcaster) degrees)
      • -------- SET COUNTERS --------
      • Set Ecounter = (Ecounter + 1)
      • Set comboCounter = (comboCounter + 1)
      • -------- START TIMER --------
      • Trigger - Run QuickComboTimer <gen> (ignoring conditions)
      • -------- PLAY ANIMATION --------
      • Custom script: call SetUnitAnimationByIndex(udg_Qcaster, 93)
      • -------- DECREASE ENERGY/STAMINA --------
      • Unit - Set mana of Qcaster to ((Mana of Qcaster) - 25.00)
      • -------- IMPACT DAMAGE --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 125.00 of attackTarget) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of Qcaster)) Equal to True
            • Then - Actions
              • Unit - Cause Qcaster to damage (Picked unit), dealing 45.00 damage of attack type Normal and damage type Normal
            • Else - Actions
  • QEQ
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Quick Attack
          • Qcounter Equal to 1
          • Ecounter Equal to 1
          • comboCounter Equal to 2
          • (Remaining time for comboQuickTimer) Greater than 0.00
    • Actions
      • Wait 0.00 seconds
      • -------- SET CASTER AND LOCATIONS --------
      • Set Qcaster = (Triggering unit)
      • Set QcasterLoc = (Position of Qcaster)
      • Set attackTarget = (QcasterLoc offset by 55.00 towards (Facing of Qcaster) degrees)
      • -------- SET COUNTERS --------
      • Set Qcounter = 0
      • Set comboCounter = 0
      • -------- START TIMER --------
      • Trigger - Run QuickComboTimer <gen> (ignoring conditions)
      • -------- PLAY ANIMATION --------
      • Custom script: call SetUnitAnimationByIndex(udg_Qcaster, 96)
      • -------- DECREASE ENERGY/STAMINA --------
      • Unit - Set mana of Qcaster to ((Mana of Qcaster) - 10.00)
      • -------- IMPACT DAMAGE --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 125.00 of attackTarget) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of Qcaster)) Equal to True
            • Then - Actions
              • Unit - Cause Qcaster to damage (Picked unit), dealing 30.00 damage of attack type Normal and damage type Normal
            • Else - Actions
  • HeavyComboTimer
    • Events
    • Conditions
    • Actions
      • Countdown Timer - Start comboHeavyTimer as a One-shot timer that will expire in 1.30 seconds

  • HeavyTimerChecker
    • Events
      • Time - comboHeavyTimer expires
    • Conditions
    • Actions
      • Set Qcounter = 0
      • Set Ecounter = 0
      • Set comboCounter = 0
      • Custom script: call RemoveLocation(udg_EcasterLoc)
      • Custom script: call RemoveLocation(udg_attackTarget)
  • E
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Heavy Attack
          • Qcounter Equal to 0
          • Ecounter Equal to 0
          • comboCounter Equal to 0
    • Actions
      • Wait 0.00 seconds
      • -------- SET CASTER AND LOCATIONS --------
      • Set Ecaster = (Triggering unit)
      • Set EcasterLoc = (Position of Ecaster)
      • Set attackTarget = (EcasterLoc offset by 55.00 towards (Facing of Ecaster) degrees)
      • -------- SET COUNTERS --------
      • Set Ecounter = (Ecounter + 1)
      • Set comboCounter = (comboCounter + 1)
      • -------- START TIMER --------
      • Trigger - Run HeavyComboTimer <gen> (ignoring conditions)
      • -------- PLAY ANIMATION --------
      • Custom script: call SetUnitAnimationByIndex(udg_Ecaster, 92)
      • -------- DECREASE ENERGY/STAMINA --------
      • Unit - Set mana of Ecaster to ((Mana of Ecaster) - 25.00)
      • -------- IMPACT DAMAGE --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 125.00 of attackTarget) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of Ecaster)) Equal to True
            • Then - Actions
              • Unit - Cause Ecaster to damage (Picked unit), dealing 45.00 damage of attack type Normal and damage type Normal
            • Else - Actions
  • EE
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Heavy Attack
          • Qcounter Equal to 0
          • Ecounter Equal to 1
          • comboCounter Equal to 1
          • (Remaining time for comboHeavyTimer) Greater than 0.00
    • Actions
      • Wait 0.00 seconds
      • -------- SET CASTER AND LOCATIONS --------
      • Set Ecaster = (Triggering unit)
      • Set EcasterLoc = (Position of Ecaster)
      • Set attackTarget = (EcasterLoc offset by 55.00 towards (Facing of Ecaster) degrees)
      • -------- SET COUNTERS --------
      • Set Ecounter = (Ecounter + 1)
      • Set comboCounter = (comboCounter + 1)
      • -------- START TIMER --------
      • Trigger - Run HeavyComboTimer <gen> (ignoring conditions)
      • -------- PLAY ANIMATION --------
      • Custom script: call SetUnitAnimationByIndex(udg_Ecaster, 93)
      • -------- DECREASE ENERGY/STAMINA --------
      • Unit - Set mana of Ecaster to ((Mana of Ecaster) - 25.00)
      • -------- IMPACT DAMAGE --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 125.00 of attackTarget) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of Ecaster)) Equal to True
            • Then - Actions
              • Unit - Cause Ecaster to damage (Picked unit), dealing 45.00 damage of attack type Normal and damage type Normal
            • Else - Actions

  • EEE
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Heavy Attack
          • Qcounter Equal to 0
          • Ecounter Equal to 2
          • comboCounter Equal to 2
          • (Remaining time for comboHeavyTimer) Greater than 0.00
    • Actions
      • Wait 0.00 seconds
      • -------- SET CASTER AND LOCATIONS --------
      • Set Ecaster = (Triggering unit)
      • Set EcasterLoc = (Position of Ecaster)
      • Set attackTarget = (EcasterLoc offset by 55.00 towards (Facing of Ecaster) degrees)
      • -------- SET COUNTERS --------
      • Set Ecounter = 0
      • Set comboCounter = 0
      • -------- START TIMER --------
      • Trigger - Run HeavyComboTimer <gen> (ignoring conditions)
      • -------- PLAY ANIMATION --------
      • Custom script: call SetUnitAnimationByIndex(udg_Ecaster, 94)
      • -------- DECREASE ENERGY/STAMINA --------
      • Unit - Set mana of Ecaster to ((Mana of Ecaster) - 25.00)
      • -------- IMPACT DAMAGE --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 125.00 of attackTarget) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of Ecaster)) Equal to True
            • Then - Actions
              • Unit - Cause Ecaster to damage (Picked unit), dealing 45.00 damage of attack type Normal and damage type Normal
            • Else - Actions
  • EEQ
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Quick Attack
          • Qcounter Equal to 0
          • Ecounter Equal to 2
          • comboCounter Equal to 2
          • (Remaining time for comboHeavyTimer) Greater than 0.00
    • Actions
      • Wait 0.00 seconds
      • -------- SET CASTER AND LOCATIONS --------
      • Set Ecaster = (Triggering unit)
      • Set EcasterLoc = (Position of Ecaster)
      • Set attackTarget = (EcasterLoc offset by 55.00 towards (Facing of Ecaster) degrees)
      • -------- SET COUNTERS --------
      • Set Ecounter = 0
      • Set comboCounter = 0
      • -------- START TIMER --------
      • Trigger - Run HeavyComboTimer <gen> (ignoring conditions)
      • -------- PLAY ANIMATION --------
      • Custom script: call SetUnitAnimationByIndex(udg_Ecaster,78)
      • -------- DECREASE ENERGY/STAMINA --------
      • Unit - Set mana of Ecaster to ((Mana of Ecaster) - 10.00)
      • -------- IMPACT DAMAGE --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 125.00 of attackTarget) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of Ecaster)) Equal to True
            • Then - Actions
              • Unit - Cause Ecaster to damage (Picked unit), dealing 30.00 damage of attack type Normal and damage type Normal
            • Else - Actions
  • EQ
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Quick Attack
          • Qcounter Equal to 0
          • Ecounter Equal to 1
          • comboCounter Equal to 1
          • (Remaining time for comboHeavyTimer) Greater than 0.00
    • Actions
      • Wait 0.00 seconds
      • -------- SET CASTER AND LOCATIONS --------
      • Set Ecaster = (Triggering unit)
      • Set EcasterLoc = (Position of Ecaster)
      • Set attackTarget = (EcasterLoc offset by 55.00 towards (Facing of Ecaster) degrees)
      • -------- SET COUNTERS --------
      • Set Qcounter = (Qcounter + 1)
      • Set comboCounter = (comboCounter + 1)
      • -------- START TIMER --------
      • Trigger - Run HeavyComboTimer <gen> (ignoring conditions)
      • -------- PLAY ANIMATION --------
      • Custom script: call SetUnitAnimationByIndex(udg_Ecaster, 79)
      • -------- DECREASE ENERGY/STAMINA --------
      • Unit - Set mana of Ecaster to ((Mana of Ecaster) - 10.00)
      • -------- IMPACT DAMAGE --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 125.00 of attackTarget) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of Ecaster)) Equal to True
            • Then - Actions
              • Unit - Cause Ecaster to damage (Picked unit), dealing 30.00 damage of attack type Normal and damage type Normal
            • Else - Actions
  • EQE
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Heavy Attack
          • Qcounter Equal to 1
          • Ecounter Equal to 1
          • comboCounter Equal to 2
          • (Remaining time for comboHeavyTimer) Greater than 0.00
    • Actions
      • Wait 0.00 seconds
      • -------- SET CASTER AND LOCATIONS --------
      • Set Ecaster = (Triggering unit)
      • Set EcasterLoc = (Position of Ecaster)
      • Set attackTarget = (EcasterLoc offset by 55.00 towards (Facing of Ecaster) degrees)
      • -------- SET COUNTERS --------
      • Set Ecounter = 0
      • Set comboCounter = 0
      • -------- START TIMER --------
      • Trigger - Run HeavyComboTimer <gen> (ignoring conditions)
      • -------- PLAY ANIMATION --------
      • Custom script: call SetUnitAnimationByIndex(udg_Ecaster,90)
      • -------- DECREASE ENERGY/STAMINA --------
      • Unit - Set mana of Ecaster to ((Mana of Ecaster) - 25.00)
      • -------- IMPACT DAMAGE --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 125.00 of attackTarget) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ((Picked unit) is alive) Equal to True
                  • ((Picked unit) belongs to an enemy of (Owner of Ecaster)) Equal to True
            • Then - Actions
              • Unit - Cause Ecaster to damage (Picked unit), dealing 45.00 damage of attack type Normal and damage type Normal
            • Else - Actions

 
Status
Not open for further replies.
Top