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

CAT (Custom attack type) system

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: Imadori
CAT system by Callahan.
Feature many custom effect triggerable on attack or ability cast.
Combo feature allows you to easily run a trigger at the end of a CAT effect if you want to add additional effect like debuff or stun.

NOTE :
System may bug if triggered on attack and attackspeed of the unit allow the unit the attack several time before the end of a CAT effect or comboed effect.
  • ConfigurableHelperand Importer
    • Events
    • Conditions
    • Actions
      • -------- CAT (Custom Attack Type) system by Callahan. --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- Required configurables --------
      • -------- ------------------------------------------------ --------
      • Set CAT_CustomAttackType[0] = Powerslam, Assault or Wave
      • -------- Define the effect that will be used by the system: Powerslam, Wave, Assault --------
      • Set Assault = Unit will charge to target then return to its position.
      • Set PowerSlam = Unit will charge to target and grab it then slaming on the ground.
      • Set Wave = Unit will send "lurker" attack type.
      • -------- ------------------------------------------------ --------
      • Set CAT_Speed[0] = 0.00
      • -------- Speed of the effect for Powerslam and Assault type define moving speed of CAT_Unit. --------
      • -------- For Wave type define interval in seconds between damage instance. --------
      • -------- ------------------------------------------------ --------
      • Set CAT_Unit[0] = No unit
      • -------- The unit that will do the damage and effect. --------
      • -------- ------------------------------------------------ --------
      • Set CAT_TargetUnit[0] = No unit
      • -------- The unit targeted by the effect and will recieve damage. --------
      • -------- ------------------------------------------------ --------
      • Set CAT_AttackRange[0] = 0.00
      • -------- For Powerslam and Assault type define the max distance that can be traveled. --------
      • -------- For Wave type define the distance between damage instance. --------
      • -------- ------------------------------------------------ --------
      • Set CAT_AttackNumber[0] = 0
      • -------- Required for Wave, Useless for Powerslam, Assault --------
      • -------- For Wave type define the number of Damage instance. --------
      • -------- Not used for Powerslam and Assault it will be set automaticaly to 1. --------
      • -------- ------------------------------------------------ --------
      • Set CAT_AttackType[0] = Spells
      • -------- Attacktype used by the effect. --------
      • -------- ------------------------------------------------ --------
      • Set CAT_Damage[0] = 0.00
      • -------- Damage dealt by the effect from CAT_Unit to CAT_TargetUnit. --------
      • -------- ------------------------------------------------ --------
      • Set CAT_DamageType[0] = Universal
      • -------- Damage type used by the effect. --------
      • -------- ------------------------------------------------ --------
      • Set CAT_DamageRadius[0] = 0.00
      • -------- Radius of damage for Aoe effect. --------
      • -------- Range at which damage will proc for single target effect. --------
      • -------- ------------------------------------------------ --------
      • Set CAT_EffectString[0] = .mdl
      • -------- String of Path and File of the mdl used by the effect. --------
      • -------- ------------------------------------------------ --------
      • Set CAT_EffectAttachpoint[0] = origin, chest, head etc...
      • -------- Attach point where the effect will attack --------
      • -------- Useless for Wave effect type --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --------
      • -------- Optional configurables --------
      • -------- ------------------------------------------------ --------
      • Set CAT_Pierce[0] = False
      • -------- Option that will modify behavior of the effect.Usualy line damage.False by default. --------
      • -------- If true : --------
      • -------- Powerslam will slam target forward instead of dragging it back and will damage unit within damage radius during charge. --------
      • -------- Assault will damage in line within damage radius. --------
      • -------- Wave will continue the effect past the targeted unit. --------
      • -------- ------------------------------------------------ --------
      • Set CAT_Homing[0] = False
      • -------- Optional that will modiify effect behavior.Usualy unavoidable.False by Default. --------
      • -------- If true : --------
      • -------- Powerslam charge will home to target. --------
      • -------- Assault will home to target and travel in an arc. --------
      • -------- Wave will home to target. --------
      • -------- ------------------------------------------------ --------
      • Set CAT_FinalAoe[0] = False
      • -------- If true : --------
      • -------- Add an additional Aoe damage at the end of the effect. --------
      • -------- Require to use: --------
      • Set CAT_FinalAoeDamage[0] = 0.00
      • Set CAT_FinalAoeRadius[0] = 0.00
      • Set CAT_FinalAoeEffectString[0] = .mdl
      • -------- ------------------------------------------------ --------
      • Set CAT_ComboTrigger[0] = (This trigger)
      • -------- The trigger that will run at the end of effect if combo is enabled. --------
      • -------- ------------------------------------------------ --------
      • Set CAT_ComboEnabled[0] = False
      • -------- If true : --------
      • -------- Will run the combo trigger at the end of effect. --------
      • -------- Require to use: --------
      • Set CAT_ComboUnit = No unit
      • Set CAT_ComboTarget = No unit
      • -------- These 2 variable refer to the previous CAT_Unit and CAT_TargetUnit when configuring combo trigger. --------
      • -------- ------------------------------------------------ --------
      • -------- ------------------------------------------------ --------
  • AssaultDemoSpawn
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Unit-type of (Attacking unit)) Equal to Turtle
    • Actions
      • -------- Indexing --------
      • Set CAT_MaxIndex = (CAT_MaxIndex + 1)
      • -------- Configurables --------
      • Set CAT_Unit[CAT_MaxIndex] = (Attacking unit)
      • Set CAT_TargetUnit[CAT_MaxIndex] = (Attacked unit)
      • Set CAT_CustomAttackType[CAT_MaxIndex] = Assault
      • Set CAT_AttackRange[CAT_MaxIndex] = 750.00
      • Set CAT_Speed[CAT_MaxIndex] = 30.00
      • Set CAT_EffectString[CAT_MaxIndex] = Abilities\Spells\Other\CrushingWave\CrushingWaveMissile.mdl
      • Set CAT_EffectAttachpoint[CAT_MaxIndex] = origin
      • Set CAT_Damage[CAT_MaxIndex] = 100.00
      • Set CAT_DamageRadius[CAT_MaxIndex] = 150.00
      • Set CAT_AttackType[CAT_MaxIndex] = Normal
      • Set CAT_DamageType[CAT_MaxIndex] = Normal
      • Set CAT_CanDamageAir[CAT_MaxIndex] = False
      • Set CAT_Pierce[CAT_MaxIndex] = True
      • Set CAT_Homing[CAT_MaxIndex] = False
      • -------- Optional feature final aoe will do an additional effect at the end --------
      • Animation - Play CAT_Unit[CAT_MaxIndex]'s stand swim animation
      • Set CAT_FinalAoe[CAT_MaxIndex] = True
      • Set CAT_FinalAoeDamage[CAT_MaxIndex] = 125.00
      • Set CAT_FinalAoeRadius[CAT_MaxIndex] = 250.00
      • Set CAT_FinalAoeEffectString[CAT_MaxIndex] = Objects\Spawnmodels\Naga\NagaDeath\NagaDeath.mdl
      • -------- Run Init trigger --------
      • Trigger - Run CATInit <gen> (ignoring conditions)
  • CATInit
    • Events
    • Conditions
    • Actions
      • Set CAT_Player[CAT_MaxIndex] = (Owner of CAT_Unit[CAT_MaxIndex])
      • Set CAT_UnitLoc[CAT_MaxIndex] = (Position of CAT_Unit[CAT_MaxIndex])
      • Set CAT_TargetLoc[CAT_MaxIndex] = (Position of CAT_TargetUnit[CAT_MaxIndex])
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CAT_CustomAttackType[CAT_MaxIndex] Equal to PowerSlam
        • Then - Actions
          • Unit - Add Crow Form to CAT_Unit[CAT_MaxIndex]
          • Unit - Remove Crow Form from CAT_Unit[CAT_MaxIndex]
          • Unit - Add Crow Form to CAT_TargetUnit[CAT_MaxIndex]
          • Unit - Remove Crow Form from CAT_TargetUnit[CAT_MaxIndex]
          • Unit - Add Ghost (Visible) to CAT_Unit[CAT_MaxIndex]
          • Set CAT_AttackNumber[CAT_MaxIndex] = 1
          • Set CAT_DistanceTraveled[CAT_MaxIndex] = CAT_AttackRange[CAT_MaxIndex]
          • Set CAT_MultipurposeReal[CAT_MaxIndex] = 1.00
          • Set CAT_OriginLoc[CAT_MaxIndex] = (Position of CAT_Unit[CAT_MaxIndex])
          • Special Effect - Create a special effect attached to the CAT_EffectAttachpoint[CAT_MaxIndex] of CAT_Unit[CAT_MaxIndex] using CAT_EffectString[CAT_MaxIndex]
          • Set CAT_Effect[CAT_MaxIndex] = (Last created special effect)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CAT_Homing[CAT_MaxIndex] Equal to False
            • Then - Actions
              • Set CAT_Angle[CAT_MaxIndex] = (Angle from CAT_UnitLoc[CAT_MaxIndex] to CAT_TargetLoc[CAT_MaxIndex])
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CAT_CustomAttackType[CAT_MaxIndex] Equal to Wave
        • Then - Actions
          • Set CAT_PeriodicCounter[CAT_MaxIndex] = CAT_Speed[CAT_MaxIndex]
          • Set CAT_MultipurposeReal[CAT_MaxIndex] = 1.00
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CAT_Homing[CAT_MaxIndex] Not equal to True
            • Then - Actions
              • Set CAT_Angle[CAT_MaxIndex] = (Angle from CAT_UnitLoc[CAT_MaxIndex] to CAT_TargetLoc[CAT_MaxIndex])
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CAT_CustomAttackType[CAT_MaxIndex] Equal to Assault
        • Then - Actions
          • Unit - Add Ghost (Visible) to CAT_Unit[CAT_MaxIndex]
          • Set CAT_AttackNumber[CAT_MaxIndex] = 1
          • Set CAT_DistanceTraveled[CAT_MaxIndex] = CAT_AttackRange[CAT_MaxIndex]
          • Set CAT_MultipurposeReal[CAT_MaxIndex] = 1.00
          • Special Effect - Create a special effect attached to the CAT_EffectAttachpoint[CAT_MaxIndex] of CAT_Unit[CAT_MaxIndex] using CAT_EffectString[CAT_MaxIndex]
          • Set CAT_Effect[CAT_MaxIndex] = (Last created special effect)
          • Custom script: call RemoveLocation( udg_CAT_OriginLoc[udg_CAT_MaxIndex] )
          • Set CAT_OriginLoc[CAT_MaxIndex] = (Position of CAT_Unit[CAT_MaxIndex])
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CAT_Homing[CAT_MaxIndex] Equal to False
            • Then - Actions
              • Set CAT_Angle[CAT_MaxIndex] = (Angle from CAT_UnitLoc[CAT_MaxIndex] to CAT_TargetLoc[CAT_MaxIndex])
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CAT_CustomAttackType[CAT_MaxIndex] Equal to Circler
        • Then - Actions
          • Unit - Add Ghost (Visible) to CAT_Unit[CAT_MaxIndex]
          • Unit - Add Crow Form to CAT_Unit[CAT_MaxIndex]
          • Unit - Remove Crow Form from CAT_Unit[CAT_MaxIndex]
          • Set CAT_AttackNumber[CAT_MaxIndex] = 1
          • Set CAT_DistanceTraveled[CAT_MaxIndex] = CAT_AttackRange[CAT_MaxIndex]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 2) Equal to 1
            • Then - Actions
              • Set CAT_MultipurposeReal[CAT_MaxIndex] = 1.00
            • Else - Actions
              • Set CAT_MultipurposeReal[CAT_MaxIndex] = -1.00
          • Special Effect - Create a special effect attached to the CAT_EffectAttachpoint[CAT_MaxIndex] of CAT_Unit[CAT_MaxIndex] using CAT_EffectString[CAT_MaxIndex]
          • Set CAT_Effect[CAT_MaxIndex] = (Last created special effect)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CAT_Homing[CAT_MaxIndex] Equal to False
            • Then - Actions
              • Set CAT_Angle[CAT_MaxIndex] = (Angle from CAT_UnitLoc[CAT_MaxIndex] to CAT_TargetLoc[CAT_MaxIndex])
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CAT Loop <gen> is on) Not equal to True
        • Then - Actions
          • Trigger - Turn on CAT Loop <gen>
        • Else - Actions
      • Custom script: call RemoveLocation( udg_CAT_TargetLoc[udg_CAT_MaxIndex] )
      • Custom script: call RemoveLocation( udg_CAT_UnitLoc[udg_CAT_MaxIndex] )
  • CAT Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • For each (Integer CAT_CurrentIndex) from 1 to CAT_MaxIndex, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CAT_AttackNumber[CAT_CurrentIndex] Greater than 0
            • Then - Actions
              • Unit Group - Add CAT_Unit[CAT_CurrentIndex] to CAT_IsBeingMovedGroup
              • Set CAT_TargetLoc[CAT_CurrentIndex] = (Position of CAT_TargetUnit[CAT_CurrentIndex])
              • Set CAT_UnitLoc[CAT_CurrentIndex] = (Position of CAT_Unit[CAT_CurrentIndex])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CAT_CustomAttackType[CAT_CurrentIndex] Equal to Wave
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CAT_Homing[CAT_CurrentIndex] Equal to True
                    • Then - Actions
                      • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by (CAT_AttackRange[CAT_CurrentIndex] x CAT_MultipurposeReal[CAT_CurrentIndex]) towards (Angle from CAT_UnitLoc[CAT_CurrentIndex] to CAT_TargetLoc[CAT_CurrentIndex]) degrees)
                    • Else - Actions
                      • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by (CAT_AttackRange[CAT_CurrentIndex] x CAT_MultipurposeReal[CAT_CurrentIndex]) towards CAT_Angle[CAT_CurrentIndex] degrees)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CAT_Pierce[CAT_CurrentIndex] Equal to False
                      • (Distance between CAT_UnitLoc[CAT_CurrentIndex] and CAT_LocOffset[CAT_CurrentIndex]) Greater than (Distance between CAT_UnitLoc[CAT_CurrentIndex] and CAT_TargetLoc[CAT_CurrentIndex])
                    • Then - Actions
                      • Set CAT_AttackNumber[CAT_CurrentIndex] = 0
                    • Else - Actions
                  • Set CAT_PeriodicCounter[CAT_CurrentIndex] = (CAT_PeriodicCounter[CAT_CurrentIndex] - 0.03)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CAT_PeriodicCounter[CAT_CurrentIndex] Less than or equal to 0.00
                    • Then - Actions
                      • Set CAT_MultipurposeReal[CAT_CurrentIndex] = (CAT_MultipurposeReal[CAT_CurrentIndex] + 1.00)
                      • Set CAT_PeriodicCounter[CAT_CurrentIndex] = CAT_Speed[CAT_CurrentIndex]
                      • Set CAT_AttackNumber[CAT_CurrentIndex] = (CAT_AttackNumber[CAT_CurrentIndex] - 1)
                      • Set CAT_DamageGroup[CAT_CurrentIndex] = (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex])
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Remove all units of (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching ((((Matching unit) belongs to an ally of CAT_Player[CAT_CurrentIndex]) Equal to True) and ((Matching unit) Not equal to CAT_TargetUnit[CAT_CurrentIndex]))) from CAT_DamageGroup[CAT_CurrentIndex]
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CAT_CanDamageAir[CAT_CurrentIndex] Equal to False
                        • Then - Actions
                          • Custom script: set bj_wantDestroyGroup = true
                          • Unit Group - Remove all units of (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching (((Matching unit) is A flying unit) Equal to True)) from CAT_DamageGroup[CAT_CurrentIndex]
                        • Else - Actions
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Pick every unit in CAT_DamageGroup[CAT_CurrentIndex] and do (Actions)
                        • Loop - Actions
                          • Unit - Cause CAT_Unit[CAT_CurrentIndex] to damage (Picked unit), dealing CAT_Damage[CAT_CurrentIndex] damage of attack type CAT_AttackType[CAT_CurrentIndex] and damage type CAT_DamageType[CAT_CurrentIndex]
                      • Special Effect - Create a special effect at CAT_LocOffset[CAT_CurrentIndex] using CAT_EffectString[CAT_CurrentIndex]
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                  • Custom script: call RemoveLocation( udg_CAT_LocOffset[udg_CAT_CurrentIndex] )
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CAT_CustomAttackType[CAT_CurrentIndex] Equal to PowerSlam
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CAT_Homing[CAT_CurrentIndex] Equal to True
                    • Then - Actions
                      • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by CAT_Speed[CAT_CurrentIndex] towards (Angle from CAT_UnitLoc[CAT_CurrentIndex] to CAT_TargetLoc[CAT_CurrentIndex]) degrees)
                    • Else - Actions
                      • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by CAT_Speed[CAT_CurrentIndex] towards CAT_Angle[CAT_CurrentIndex] degrees)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Distance between CAT_UnitLoc[CAT_CurrentIndex] and CAT_TargetLoc[CAT_CurrentIndex]) Less than or equal to CAT_DamageRadius[CAT_CurrentIndex]
                    • Then - Actions
                      • Unit - Add Cargo Hold (Orc Burrow) to CAT_TargetUnit[CAT_CurrentIndex]
                      • Set CAT_MultipurposeReal[CAT_CurrentIndex] = -1.00
                      • Special Effect - Destroy CAT_Effect[CAT_CurrentIndex]
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CAT_MultipurposeReal[CAT_CurrentIndex] Equal to 1.00
                      • CAT_DistanceTraveled[CAT_CurrentIndex] Greater than 0.00
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CAT_Pierce[CAT_CurrentIndex] Equal to True
                        • Then - Actions
                          • Set CAT_DamageGroup[CAT_CurrentIndex] = (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex])
                          • Custom script: set bj_wantDestroyGroup = true
                          • Unit Group - Remove all units of (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching ((((Matching unit) belongs to an ally of CAT_Player[CAT_CurrentIndex]) Equal to True) and ((Matching unit) Not equal to CAT_TargetUnit[CAT_CurrentIndex]))) from CAT_DamageGroup[CAT_CurrentIndex]
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • CAT_CanDamageAir[CAT_CurrentIndex] Equal to False
                            • Then - Actions
                              • Custom script: set bj_wantDestroyGroup = true
                              • Unit Group - Remove all units of (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching (((Matching unit) is A flying unit) Equal to True)) from CAT_DamageGroup[CAT_CurrentIndex]
                            • Else - Actions
                          • Custom script: set bj_wantDestroyGroup = true
                          • Unit Group - Pick every unit in CAT_DamageGroup[CAT_CurrentIndex] and do (Actions)
                            • Loop - Actions
                              • Unit - Cause CAT_Unit[CAT_CurrentIndex] to damage (Picked unit), dealing (CAT_Damage[CAT_CurrentIndex] / 33.00) damage of attack type CAT_AttackType[CAT_CurrentIndex] and damage type CAT_DamageType[CAT_CurrentIndex]
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Terrain pathing at CAT_LocOffset[CAT_CurrentIndex] of type Walkability is off) Equal to False
                        • Then - Actions
                          • Custom script: call SetUnitX(( udg_CAT_Unit[udg_CAT_CurrentIndex] ), GetLocationX( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                          • Custom script: call SetUnitY(( udg_CAT_Unit[udg_CAT_CurrentIndex] ), GetLocationY( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                        • Else - Actions
                      • Custom script: call SetUnitFacing(( udg_CAT_Unit[udg_CAT_CurrentIndex] ),AngleBetweenPoints(udg_CAT_UnitLoc[udg_CAT_CurrentIndex], udg_CAT_TargetLoc[udg_CAT_CurrentIndex]) )
                      • Custom script: call RemoveLocation( udg_CAT_LocOffset[udg_CAT_CurrentIndex] )
                      • Set CAT_DistanceTraveled[CAT_CurrentIndex] = (CAT_DistanceTraveled[CAT_CurrentIndex] - CAT_Speed[CAT_CurrentIndex])
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CAT_Pierce[CAT_CurrentIndex] Equal to True
                          • CAT_MultipurposeReal[CAT_CurrentIndex] Equal to -1.00
                        • Then - Actions
                          • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by (CAT_Speed[CAT_CurrentIndex] x 0.50) towards (Facing of CAT_Unit[CAT_CurrentIndex]) degrees)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Terrain pathing at CAT_LocOffset[CAT_CurrentIndex] of type Walkability is off) Equal to False
                              • (CAT_TargetUnit[CAT_CurrentIndex] is in CAT_IsBeingMovedGroup) Equal to False
                            • Then - Actions
                              • Custom script: call SetUnitX(( udg_CAT_Unit[udg_CAT_CurrentIndex] ), GetLocationX( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                              • Custom script: call SetUnitY(( udg_CAT_Unit[udg_CAT_CurrentIndex] ), GetLocationY( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                              • Custom script: call SetUnitFacing(( udg_CAT_Unit[udg_CAT_CurrentIndex] ),AngleBetweenPoints(udg_CAT_UnitLoc[udg_CAT_CurrentIndex], udg_CAT_LocOffset[udg_CAT_CurrentIndex]) )
                              • Animation - Change CAT_Unit[CAT_CurrentIndex] flying height to CAT_DistanceTraveled[CAT_CurrentIndex] at 1000.00
                            • Else - Actions
                          • Custom script: call RemoveLocation( udg_CAT_LocOffset[udg_CAT_CurrentIndex] )
                          • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by CAT_DamageRadius[CAT_CurrentIndex] towards (Facing of CAT_Unit[CAT_MaxIndex]) degrees)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Terrain pathing at CAT_LocOffset[CAT_CurrentIndex] of type Walkability is off) Equal to False
                              • (CAT_TargetUnit[CAT_CurrentIndex] is in CAT_IsBeingMovedGroup) Equal to False
                            • Then - Actions
                              • Custom script: call SetUnitX(( udg_CAT_TargetUnit[udg_CAT_CurrentIndex] ), GetLocationX( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                              • Custom script: call SetUnitY(( udg_CAT_TargetUnit[udg_CAT_CurrentIndex] ), GetLocationY( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                              • Animation - Change CAT_TargetUnit[CAT_CurrentIndex] flying height to (CAT_DistanceTraveled[CAT_CurrentIndex] x 1.20) at 1200.00
                            • Else - Actions
                          • Custom script: call RemoveLocation( udg_CAT_LocOffset[udg_CAT_CurrentIndex] )
                          • Set CAT_DistanceTraveled[CAT_CurrentIndex] = (CAT_DistanceTraveled[CAT_CurrentIndex] - CAT_Speed[CAT_CurrentIndex])
                          • Unit - Cause CAT_Unit[CAT_CurrentIndex] to damage CAT_TargetUnit[CAT_CurrentIndex], dealing (CAT_Damage[CAT_CurrentIndex] / 33.00) damage of attack type CAT_AttackType[CAT_CurrentIndex] and damage type CAT_DamageType[CAT_CurrentIndex]
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CAT_Pierce[CAT_CurrentIndex] Equal to False
                          • CAT_MultipurposeReal[CAT_CurrentIndex] Equal to -1.00
                          • (Distance between CAT_UnitLoc[CAT_CurrentIndex] and CAT_OriginLoc[CAT_CurrentIndex]) Greater than CAT_Speed[CAT_CurrentIndex]
                        • Then - Actions
                          • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by CAT_Speed[CAT_CurrentIndex] towards (Angle from CAT_UnitLoc[CAT_CurrentIndex] to CAT_OriginLoc[CAT_CurrentIndex]) degrees)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Terrain pathing at CAT_LocOffset[CAT_CurrentIndex] of type Walkability is off) Equal to False
                              • (CAT_TargetUnit[CAT_CurrentIndex] is in CAT_IsBeingMovedGroup) Equal to False
                            • Then - Actions
                              • Custom script: call SetUnitX(( udg_CAT_Unit[udg_CAT_CurrentIndex] ), GetLocationX( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                              • Custom script: call SetUnitY(( udg_CAT_Unit[udg_CAT_CurrentIndex] ), GetLocationY( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                              • Animation - Change CAT_Unit[CAT_CurrentIndex] flying height to (Distance between CAT_UnitLoc[CAT_CurrentIndex] and CAT_OriginLoc[CAT_CurrentIndex]) at 1000.00
                            • Else - Actions
                          • Custom script: call RemoveLocation( udg_CAT_LocOffset[udg_CAT_CurrentIndex] )
                          • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by CAT_DamageRadius[CAT_CurrentIndex] towards (Facing of CAT_Unit[CAT_MaxIndex]) degrees)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Terrain pathing at CAT_LocOffset[CAT_CurrentIndex] of type Walkability is off) Equal to False
                              • (CAT_TargetUnit[CAT_CurrentIndex] is in CAT_IsBeingMovedGroup) Equal to False
                            • Then - Actions
                              • Custom script: call SetUnitX(( udg_CAT_TargetUnit[udg_CAT_CurrentIndex] ), GetLocationX( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                              • Custom script: call SetUnitY(( udg_CAT_TargetUnit[udg_CAT_CurrentIndex] ), GetLocationY( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                              • Animation - Change CAT_TargetUnit[CAT_CurrentIndex] flying height to ((Distance between CAT_UnitLoc[CAT_CurrentIndex] and CAT_OriginLoc[CAT_CurrentIndex]) x 1.20) at 1200.00
                            • Else - Actions
                          • Custom script: call RemoveLocation( udg_CAT_LocOffset[udg_CAT_CurrentIndex] )
                          • Set CAT_DistanceTraveled[CAT_CurrentIndex] = (CAT_DistanceTraveled[CAT_CurrentIndex] - CAT_Speed[CAT_CurrentIndex])
                          • Unit - Cause CAT_Unit[CAT_CurrentIndex] to damage CAT_TargetUnit[CAT_CurrentIndex], dealing (CAT_Damage[CAT_CurrentIndex] / 33.00) damage of attack type CAT_AttackType[CAT_CurrentIndex] and damage type CAT_DamageType[CAT_CurrentIndex]
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • CAT_Pierce[CAT_CurrentIndex] Equal to False
                              • (Distance between CAT_UnitLoc[CAT_CurrentIndex] and CAT_OriginLoc[CAT_CurrentIndex]) Less than or equal to CAT_Speed[CAT_CurrentIndex]
                            • Then - Actions
                              • Custom script: call SetUnitFacing(( udg_CAT_Unit[udg_CAT_CurrentIndex] ),AngleBetweenPoints(udg_CAT_UnitLoc[udg_CAT_CurrentIndex], udg_CAT_TargetLoc[udg_CAT_CurrentIndex]) )
                              • Set CAT_AttackNumber[CAT_CurrentIndex] = 0
                            • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CAT_DistanceTraveled[CAT_CurrentIndex] Less than or equal to 0.00
                    • Then - Actions
                      • Special Effect - Destroy CAT_Effect[CAT_CurrentIndex]
                      • Set CAT_AttackNumber[CAT_CurrentIndex] = 0
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CAT_CustomAttackType[CAT_CurrentIndex] Equal to Assault
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CAT_Homing[CAT_CurrentIndex] Equal to True
                    • Then - Actions
                      • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by CAT_Speed[CAT_CurrentIndex] towards (Angle from CAT_UnitLoc[CAT_CurrentIndex] to CAT_TargetLoc[CAT_CurrentIndex]) degrees)
                    • Else - Actions
                      • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by CAT_Speed[CAT_CurrentIndex] towards CAT_Angle[CAT_CurrentIndex] degrees)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CAT_MultipurposeReal[CAT_CurrentIndex] Equal to 1.00
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CAT_DistanceTraveled[CAT_CurrentIndex] Less than or equal to 0.00
                        • Then - Actions
                          • Set CAT_MultipurposeReal[CAT_CurrentIndex] = -1.00
                          • Set CAT_DistanceTraveled[CAT_CurrentIndex] = (CAT_AttackRange[CAT_CurrentIndex] x 2.00)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • CAT_FinalAoe[CAT_CurrentIndex] Equal to True
                            • Then - Actions
                              • Set CAT_DamageGroup[CAT_CurrentIndex] = (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_UnitLoc[CAT_CurrentIndex])
                              • Custom script: set bj_wantDestroyGroup = true
                              • Unit Group - Remove all units of (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_UnitLoc[CAT_CurrentIndex] matching ((((Matching unit) belongs to an ally of CAT_Player[CAT_CurrentIndex]) Equal to True) and ((Matching unit) Not equal to CAT_TargetUnit[CAT_CurrentIndex]))) from CAT_DamageGroup[CAT_CurrentIndex]
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • CAT_CanDamageAir[CAT_CurrentIndex] Equal to False
                                • Then - Actions
                                  • Custom script: set bj_wantDestroyGroup = true
                                  • Unit Group - Remove all units of (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_UnitLoc[CAT_CurrentIndex] matching (((Matching unit) is A flying unit) Equal to True)) from CAT_DamageGroup[CAT_CurrentIndex]
                                • Else - Actions
                              • Unit Group - Remove CAT_Unit[CAT_CurrentIndex] from CAT_DamageGroup[CAT_CurrentIndex]
                              • Custom script: set bj_wantDestroyGroup = true
                              • Unit Group - Pick every unit in CAT_DamageGroup[CAT_CurrentIndex] and do (Actions)
                                • Loop - Actions
                                  • Unit - Cause CAT_Unit[CAT_CurrentIndex] to damage (Picked unit), dealing CAT_FinalAoeDamage[CAT_CurrentIndex] damage of attack type CAT_AttackType[CAT_CurrentIndex] and damage type CAT_DamageType[CAT_CurrentIndex]
                              • Special Effect - Create a special effect at CAT_UnitLoc[CAT_CurrentIndex] using CAT_FinalAoeEffectString[CAT_CurrentIndex]
                              • Special Effect - Destroy (Last created special effect)
                            • Else - Actions
                        • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CAT_Pierce[CAT_CurrentIndex] Equal to True
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • CAT_Homing[CAT_CurrentIndex] Equal to True
                              • (Distance between CAT_TargetLoc[CAT_CurrentIndex] and CAT_UnitLoc[CAT_CurrentIndex]) Less than or equal to CAT_DamageRadius[CAT_CurrentIndex]
                            • Then - Actions
                              • Set CAT_MultipurposeReal[CAT_CurrentIndex] = -1.00
                              • Set CAT_DistanceTraveled[CAT_CurrentIndex] = (CAT_AttackRange[CAT_CurrentIndex] x 2.00)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • CAT_FinalAoe[CAT_CurrentIndex] Equal to True
                                • Then - Actions
                                  • Set CAT_DamageGroup[CAT_CurrentIndex] = (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_UnitLoc[CAT_CurrentIndex])
                                  • Custom script: set bj_wantDestroyGroup = true
                                  • Unit Group - Remove all units of (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_UnitLoc[CAT_CurrentIndex] matching ((((Matching unit) belongs to an ally of CAT_Player[CAT_CurrentIndex]) Equal to True) and ((Matching unit) Not equal to CAT_TargetUnit[CAT_CurrentIndex]))) from CAT_DamageGroup[CAT_CurrentIndex]
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • CAT_CanDamageAir[CAT_CurrentIndex] Equal to False
                                    • Then - Actions
                                      • Custom script: set bj_wantDestroyGroup = true
                                      • Unit Group - Remove all units of (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_UnitLoc[CAT_CurrentIndex] matching (((Matching unit) is A flying unit) Equal to True)) from CAT_DamageGroup[CAT_CurrentIndex]
                                    • Else - Actions
                                  • Unit Group - Remove CAT_Unit[CAT_CurrentIndex] from CAT_DamageGroup[CAT_CurrentIndex]
                                  • Custom script: set bj_wantDestroyGroup = true
                                  • Unit Group - Pick every unit in CAT_DamageGroup[CAT_CurrentIndex] and do (Actions)
                                    • Loop - Actions
                                      • Unit - Cause CAT_Unit[CAT_CurrentIndex] to damage (Picked unit), dealing CAT_FinalAoeDamage[CAT_CurrentIndex] damage of attack type CAT_AttackType[CAT_CurrentIndex] and damage type CAT_DamageType[CAT_CurrentIndex]
                                  • Special Effect - Create a special effect at CAT_UnitLoc[CAT_CurrentIndex] using CAT_FinalAoeEffectString[CAT_CurrentIndex]
                                  • Special Effect - Destroy (Last created special effect)
                                • Else - Actions
                            • Else - Actions
                          • Set CAT_DamageGroup[CAT_CurrentIndex] = (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex])
                          • Custom script: set bj_wantDestroyGroup = true
                          • Unit Group - Remove all units of (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching ((((Matching unit) belongs to an ally of CAT_Player[CAT_CurrentIndex]) Equal to True) and ((Matching unit) Not equal to CAT_TargetUnit[CAT_CurrentIndex]))) from CAT_DamageGroup[CAT_CurrentIndex]
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • CAT_CanDamageAir[CAT_CurrentIndex] Equal to False
                            • Then - Actions
                              • Custom script: set bj_wantDestroyGroup = true
                              • Unit Group - Remove all units of (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching (((Matching unit) is A flying unit) Equal to True)) from CAT_DamageGroup[CAT_CurrentIndex]
                            • Else - Actions
                          • Custom script: set bj_wantDestroyGroup = true
                          • Unit Group - Pick every unit in CAT_DamageGroup[CAT_CurrentIndex] and do (Actions)
                            • Loop - Actions
                              • Unit - Cause CAT_Unit[CAT_CurrentIndex] to damage (Picked unit), dealing (CAT_Damage[CAT_CurrentIndex] / 33.00) damage of attack type CAT_AttackType[CAT_CurrentIndex] and damage type CAT_DamageType[CAT_CurrentIndex]
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Distance between CAT_TargetLoc[CAT_CurrentIndex] and CAT_UnitLoc[CAT_CurrentIndex]) Less than or equal to CAT_DamageRadius[CAT_CurrentIndex]
                            • Then - Actions
                              • Unit - Cause CAT_Unit[CAT_CurrentIndex] to damage CAT_TargetUnit[CAT_CurrentIndex], dealing CAT_Damage[CAT_CurrentIndex] damage of attack type CAT_AttackType[CAT_CurrentIndex] and damage type CAT_DamageType[CAT_CurrentIndex]
                              • Set CAT_MultipurposeReal[CAT_CurrentIndex] = -1.00
                              • Set CAT_DistanceTraveled[CAT_CurrentIndex] = (CAT_AttackRange[CAT_CurrentIndex] x 2.00)
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • CAT_FinalAoe[CAT_CurrentIndex] Equal to True
                                • Then - Actions
                                  • Set CAT_DamageGroup[CAT_CurrentIndex] = (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_UnitLoc[CAT_CurrentIndex])
                                  • Custom script: set bj_wantDestroyGroup = true
                                  • Unit Group - Remove all units of (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_UnitLoc[CAT_CurrentIndex] matching ((((Matching unit) belongs to an ally of CAT_Player[CAT_CurrentIndex]) Equal to True) and ((Matching unit) Not equal to CAT_TargetUnit[CAT_CurrentIndex]))) from CAT_DamageGroup[CAT_CurrentIndex]
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • CAT_CanDamageAir[CAT_CurrentIndex] Equal to False
                                    • Then - Actions
                                      • Custom script: set bj_wantDestroyGroup = true
                                      • Unit Group - Remove all units of (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_UnitLoc[CAT_CurrentIndex] matching (((Matching unit) is A flying unit) Equal to True)) from CAT_DamageGroup[CAT_CurrentIndex]
                                    • Else - Actions
                                  • Unit Group - Remove CAT_Unit[CAT_CurrentIndex] from CAT_DamageGroup[CAT_CurrentIndex]
                                  • Custom script: set bj_wantDestroyGroup = true
                                  • Unit Group - Pick every unit in CAT_DamageGroup[CAT_CurrentIndex] and do (Actions)
                                    • Loop - Actions
                                      • Unit - Cause CAT_Unit[CAT_CurrentIndex] to damage (Picked unit), dealing CAT_FinalAoeDamage[CAT_CurrentIndex] damage of attack type CAT_AttackType[CAT_CurrentIndex] and damage type CAT_DamageType[CAT_CurrentIndex]
                                  • Special Effect - Create a special effect at CAT_UnitLoc[CAT_CurrentIndex] using CAT_FinalAoeEffectString[CAT_CurrentIndex]
                                  • Special Effect - Destroy (Last created special effect)
                                • Else - Actions
                            • Else - Actions
                      • Custom script: call SetUnitX(( udg_CAT_Unit[udg_CAT_CurrentIndex] ), GetLocationX( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                      • Custom script: call SetUnitY(( udg_CAT_Unit[udg_CAT_CurrentIndex] ), GetLocationY( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                      • Custom script: call SetUnitFacing(( udg_CAT_Unit[udg_CAT_CurrentIndex] ),AngleBetweenPoints(udg_CAT_UnitLoc[udg_CAT_CurrentIndex], udg_CAT_TargetLoc[udg_CAT_CurrentIndex]) )
                      • Custom script: call RemoveLocation( udg_CAT_LocOffset[udg_CAT_CurrentIndex] )
                      • Set CAT_DistanceTraveled[CAT_CurrentIndex] = (CAT_DistanceTraveled[CAT_CurrentIndex] - CAT_Speed[CAT_CurrentIndex])
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CAT_MultipurposeReal[CAT_CurrentIndex] Equal to -1.00
                    • Then - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Distance between CAT_UnitLoc[CAT_CurrentIndex] and CAT_OriginLoc[CAT_CurrentIndex]) Greater than CAT_Speed[CAT_CurrentIndex]
                          • CAT_DistanceTraveled[CAT_CurrentIndex] Greater than 0.00
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • CAT_Homing[CAT_CurrentIndex] Equal to False
                            • Then - Actions
                              • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by CAT_Speed[CAT_CurrentIndex] towards (Angle from (Position of CAT_Unit[CAT_CurrentIndex]) to CAT_OriginLoc[CAT_CurrentIndex]) degrees)
                            • Else - Actions
                              • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by CAT_Speed[CAT_CurrentIndex] towards (Facing of CAT_Unit[CAT_CurrentIndex]) degrees)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • CAT_Pierce[CAT_CurrentIndex] Equal to True
                            • Then - Actions
                              • Set CAT_DamageGroup[CAT_CurrentIndex] = (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex])
                              • Custom script: set bj_wantDestroyGroup = true
                              • Unit Group - Remove all units of (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching ((((Matching unit) belongs to an ally of CAT_Player[CAT_CurrentIndex]) Equal to True) and ((Matching unit) Not equal to CAT_TargetUnit[CAT_CurrentIndex]))) from CAT_DamageGroup[CAT_CurrentIndex]
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • CAT_CanDamageAir[CAT_CurrentIndex] Equal to False
                                • Then - Actions
                                  • Custom script: set bj_wantDestroyGroup = true
                                  • Unit Group - Remove all units of (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching (((Matching unit) is A flying unit) Equal to True)) from CAT_DamageGroup[CAT_CurrentIndex]
                                • Else - Actions
                              • Custom script: set bj_wantDestroyGroup = true
                              • Unit Group - Pick every unit in CAT_DamageGroup[CAT_CurrentIndex] and do (Actions)
                                • Loop - Actions
                                  • Unit - Cause CAT_Unit[CAT_CurrentIndex] to damage (Picked unit), dealing (CAT_Damage[CAT_CurrentIndex] / 33.00) damage of attack type CAT_AttackType[CAT_CurrentIndex] and damage type CAT_DamageType[CAT_CurrentIndex]
                            • Else - Actions
                          • Custom script: call SetUnitX(( udg_CAT_Unit[udg_CAT_CurrentIndex] ), GetLocationX( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                          • Custom script: call SetUnitY(( udg_CAT_Unit[udg_CAT_CurrentIndex] ), GetLocationY( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                          • Custom script: call SetUnitFacing(( udg_CAT_Unit[udg_CAT_CurrentIndex] ),AngleBetweenPoints(udg_CAT_UnitLoc[udg_CAT_CurrentIndex], udg_CAT_OriginLoc[udg_CAT_CurrentIndex]) )
                          • Custom script: call RemoveLocation( udg_CAT_LocOffset[udg_CAT_CurrentIndex] )
                          • Set CAT_DistanceTraveled[CAT_CurrentIndex] = (CAT_DistanceTraveled[CAT_CurrentIndex] - CAT_Speed[CAT_CurrentIndex])
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • CAT_DistanceTraveled[CAT_CurrentIndex] Less than or equal to 0.00
                            • Then - Actions
                              • Special Effect - Destroy CAT_Effect[CAT_CurrentIndex]
                              • Custom script: call SetUnitFacing(( udg_CAT_Unit[udg_CAT_CurrentIndex] ),AngleBetweenPoints(udg_CAT_UnitLoc[udg_CAT_CurrentIndex], udg_CAT_TargetLoc[udg_CAT_CurrentIndex]) )
                              • Set CAT_AttackNumber[CAT_CurrentIndex] = 0
                            • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Distance between CAT_UnitLoc[CAT_CurrentIndex] and CAT_OriginLoc[CAT_CurrentIndex]) Less than or equal to CAT_Speed[CAT_CurrentIndex]
                            • Then - Actions
                              • Special Effect - Destroy CAT_Effect[CAT_CurrentIndex]
                              • Custom script: call SetUnitFacing(( udg_CAT_Unit[udg_CAT_CurrentIndex] ),AngleBetweenPoints(udg_CAT_UnitLoc[udg_CAT_CurrentIndex], udg_CAT_TargetLoc[udg_CAT_CurrentIndex]) )
                              • Set CAT_AttackNumber[CAT_CurrentIndex] = 0
                            • Else - Actions
                    • Else - Actions
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CAT_CustomAttackType[CAT_CurrentIndex] Equal to Circler
                • Then - Actions
                  • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by CAT_Speed[CAT_CurrentIndex] towards ((Facing of CAT_Unit[CAT_CurrentIndex]) + (85.00 x CAT_MultipurposeReal[CAT_CurrentIndex])) degrees)
                  • Set CAT_DistanceTraveled[CAT_CurrentIndex] = (CAT_DistanceTraveled[CAT_CurrentIndex] - CAT_Speed[CAT_CurrentIndex])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Terrain pathing at CAT_LocOffset[CAT_CurrentIndex] of type Walkability is off) Equal to False
                    • Then - Actions
                      • Custom script: call SetUnitX(( udg_CAT_Unit[udg_CAT_CurrentIndex] ), GetLocationX( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                      • Custom script: call SetUnitY(( udg_CAT_Unit[udg_CAT_CurrentIndex] ), GetLocationY( udg_CAT_LocOffset[udg_CAT_CurrentIndex] ))
                      • Custom script: call SetUnitFacing(( udg_CAT_Unit[udg_CAT_CurrentIndex] ),AngleBetweenPoints(udg_CAT_UnitLoc[udg_CAT_CurrentIndex], udg_CAT_TargetLoc[udg_CAT_CurrentIndex]) )
                      • Animation - Change CAT_Unit[CAT_CurrentIndex] flying height to CAT_DistanceTraveled[CAT_CurrentIndex] at 1000.00
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CAT_Pierce[CAT_CurrentIndex] Equal to True
                        • Then - Actions
                          • Set CAT_DamageGroup[CAT_CurrentIndex] = (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex])
                          • Custom script: set bj_wantDestroyGroup = true
                          • Unit Group - Remove all units of (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching ((((Matching unit) belongs to an ally of CAT_Player[CAT_CurrentIndex]) Equal to True) and ((Matching unit) Not equal to CAT_TargetUnit[CAT_CurrentIndex]))) from CAT_DamageGroup[CAT_CurrentIndex]
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • CAT_CanDamageAir[CAT_CurrentIndex] Equal to False
                            • Then - Actions
                              • Custom script: set bj_wantDestroyGroup = true
                              • Unit Group - Remove all units of (Units within CAT_DamageRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching (((Matching unit) is A flying unit) Equal to True)) from CAT_DamageGroup[CAT_CurrentIndex]
                            • Else - Actions
                          • Custom script: set bj_wantDestroyGroup = true
                          • Unit Group - Pick every unit in CAT_DamageGroup[CAT_CurrentIndex] and do (Actions)
                            • Loop - Actions
                              • Unit - Cause CAT_Unit[CAT_CurrentIndex] to damage (Picked unit), dealing (CAT_Damage[CAT_CurrentIndex] / 33.00) damage of attack type CAT_AttackType[CAT_CurrentIndex] and damage type CAT_DamageType[CAT_CurrentIndex]
                        • Else - Actions
                    • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CAT_DistanceTraveled[CAT_CurrentIndex] Less than or equal to 0.00
                    • Then - Actions
                      • Animation - Change CAT_Unit[CAT_CurrentIndex] flying height to (Default flying height of CAT_Unit[CAT_CurrentIndex]) at 1000.00
                      • Special Effect - Destroy CAT_Effect[CAT_CurrentIndex]
                      • Set CAT_AttackNumber[CAT_CurrentIndex] = 0
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CAT_FinalAoe[CAT_CurrentIndex] Equal to True
                        • Then - Actions
                          • Set CAT_DamageGroup[CAT_CurrentIndex] = (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_UnitLoc[CAT_CurrentIndex])
                          • Custom script: set bj_wantDestroyGroup = true
                          • Unit Group - Remove all units of (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_UnitLoc[CAT_CurrentIndex] matching ((((Matching unit) belongs to an ally of CAT_Player[CAT_CurrentIndex]) Equal to True) and ((Matching unit) Not equal to CAT_TargetUnit[CAT_CurrentIndex]))) from CAT_DamageGroup[CAT_CurrentIndex]
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • CAT_CanDamageAir[CAT_CurrentIndex] Equal to False
                            • Then - Actions
                              • Custom script: set bj_wantDestroyGroup = true
                              • Unit Group - Remove all units of (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_UnitLoc[CAT_CurrentIndex] matching (((Matching unit) is A flying unit) Equal to True)) from CAT_DamageGroup[CAT_CurrentIndex]
                            • Else - Actions
                          • Unit Group - Remove CAT_Unit[CAT_CurrentIndex] from CAT_DamageGroup[CAT_CurrentIndex]
                          • Custom script: set bj_wantDestroyGroup = true
                          • Unit Group - Pick every unit in CAT_DamageGroup[CAT_CurrentIndex] and do (Actions)
                            • Loop - Actions
                              • Unit - Cause CAT_Unit[CAT_CurrentIndex] to damage (Picked unit), dealing CAT_FinalAoeDamage[CAT_CurrentIndex] damage of attack type CAT_AttackType[CAT_CurrentIndex] and damage type CAT_DamageType[CAT_CurrentIndex]
                          • Special Effect - Create a special effect at CAT_UnitLoc[CAT_CurrentIndex] using CAT_FinalAoeEffectString[CAT_CurrentIndex]
                          • Special Effect - Destroy (Last created special effect)
                        • Else - Actions
                    • Else - Actions
                  • Custom script: call RemoveLocation( udg_CAT_LocOffset[udg_CAT_CurrentIndex] )
                • Else - Actions
              • Custom script: call RemoveLocation( udg_CAT_TargetLoc[udg_CAT_CurrentIndex] )
              • Custom script: call RemoveLocation( udg_CAT_UnitLoc[udg_CAT_CurrentIndex] )
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CAT_CustomAttackType[CAT_CurrentIndex] Equal to PowerSlam
                  • CAT_MultipurposeReal[CAT_CurrentIndex] Equal to -1.00
                • Then - Actions
                  • Unit - Remove Cargo Hold (Orc Burrow) from CAT_TargetUnit[CAT_CurrentIndex]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CAT_FinalAoe[CAT_CurrentIndex] Equal to True
                    • Then - Actions
                      • Set CAT_LocOffset[CAT_CurrentIndex] = (Position of CAT_TargetUnit[CAT_CurrentIndex])
                      • Set CAT_DamageGroup[CAT_CurrentIndex] = (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex])
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Remove all units of (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching ((((Matching unit) belongs to an ally of CAT_Player[CAT_CurrentIndex]) Equal to True) and ((Matching unit) Not equal to CAT_TargetUnit[CAT_CurrentIndex]))) from CAT_DamageGroup[CAT_CurrentIndex]
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • CAT_CanDamageAir[CAT_CurrentIndex] Equal to False
                        • Then - Actions
                          • Custom script: set bj_wantDestroyGroup = true
                          • Unit Group - Remove all units of (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching (((Matching unit) is A flying unit) Equal to True)) from CAT_DamageGroup[CAT_CurrentIndex]
                        • Else - Actions
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Pick every unit in CAT_DamageGroup[CAT_CurrentIndex] and do (Actions)
                        • Loop - Actions
                          • Unit - Cause CAT_Unit[CAT_CurrentIndex] to damage (Picked unit), dealing CAT_FinalAoeDamage[CAT_CurrentIndex] damage of attack type CAT_AttackType[CAT_CurrentIndex] and damage type CAT_DamageType[CAT_CurrentIndex]
                      • Special Effect - Create a special effect at CAT_LocOffset[CAT_CurrentIndex] using CAT_FinalAoeEffectString[CAT_CurrentIndex]
                      • Special Effect - Destroy (Last created special effect)
                      • Custom script: call RemoveLocation( udg_CAT_LocOffset[udg_CAT_CurrentIndex] )
                    • Else - Actions
                  • Animation - Change CAT_Unit[CAT_CurrentIndex] flying height to (Default flying height of CAT_Unit[CAT_CurrentIndex]) at 5000.00
                  • Animation - Change CAT_TargetUnit[CAT_CurrentIndex] flying height to (Default flying height of CAT_TargetUnit[CAT_CurrentIndex]) at 5000.00
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CAT_CustomAttackType[CAT_CurrentIndex] Equal to Wave
                  • CAT_FinalAoe[CAT_CurrentIndex] Equal to True
                • Then - Actions
                  • Set CAT_TargetLoc[CAT_CurrentIndex] = (Position of CAT_TargetUnit[CAT_CurrentIndex])
                  • Set CAT_UnitLoc[CAT_CurrentIndex] = (Position of CAT_Unit[CAT_CurrentIndex])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CAT_Homing[CAT_CurrentIndex] Equal to True
                    • Then - Actions
                      • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by (CAT_AttackRange[CAT_CurrentIndex] x CAT_MultipurposeReal[CAT_CurrentIndex]) towards (Angle from CAT_UnitLoc[CAT_CurrentIndex] to CAT_TargetLoc[CAT_CurrentIndex]) degrees)
                    • Else - Actions
                      • Set CAT_LocOffset[CAT_CurrentIndex] = (CAT_UnitLoc[CAT_CurrentIndex] offset by (CAT_AttackRange[CAT_CurrentIndex] x CAT_MultipurposeReal[CAT_CurrentIndex]) towards CAT_Angle[CAT_CurrentIndex] degrees)
                  • Custom script: call RemoveLocation( udg_CAT_TargetLoc[udg_CAT_CurrentIndex] )
                  • Custom script: call RemoveLocation( udg_CAT_UnitLoc[udg_CAT_CurrentIndex] )
                  • Set CAT_DamageGroup[CAT_CurrentIndex] = (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex])
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Remove all units of (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching ((((Matching unit) belongs to an ally of CAT_Player[CAT_CurrentIndex]) Equal to True) and ((Matching unit) Not equal to CAT_TargetUnit[CAT_CurrentIndex]))) from CAT_DamageGroup[CAT_CurrentIndex]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • CAT_CanDamageAir[CAT_CurrentIndex] Equal to False
                    • Then - Actions
                      • Custom script: set bj_wantDestroyGroup = true
                      • Unit Group - Remove all units of (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching (((Matching unit) is A flying unit) Equal to True)) from CAT_DamageGroup[CAT_CurrentIndex]
                    • Else - Actions
                  • Custom script: set bj_wantDestroyGroup = true
                  • Unit Group - Pick every unit in CAT_DamageGroup[CAT_CurrentIndex] and do (Actions)
                    • Loop - Actions
                      • Unit - Cause CAT_Unit[CAT_CurrentIndex] to damage (Picked unit), dealing CAT_FinalAoeDamage[CAT_CurrentIndex] damage of attack type CAT_AttackType[CAT_CurrentIndex] and damage type CAT_DamageType[CAT_CurrentIndex]
                  • Special Effect - Create a special effect at CAT_LocOffset[CAT_CurrentIndex] using CAT_FinalAoeEffectString[CAT_CurrentIndex]
                  • Special Effect - Destroy (Last created special effect)
                  • Custom script: call RemoveLocation( udg_CAT_LocOffset[udg_CAT_CurrentIndex] )
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Ghost (Visible) for CAT_Unit[CAT_CurrentIndex]) Greater than 0
                • Then - Actions
                  • Unit - Remove Ghost (Visible) from CAT_Unit[CAT_CurrentIndex]
                • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CAT_ComboEnabled[CAT_CurrentIndex] Equal to True
                  • (CAT_TargetUnit[CAT_CurrentIndex] is alive) Equal to True
                • Then - Actions
                  • Set CAT_ComboUnit = CAT_Unit[CAT_CurrentIndex]
                  • Set CAT_ComboTarget = CAT_TargetUnit[CAT_CurrentIndex]
                  • Trigger - Run CAT_ComboTrigger[CAT_CurrentIndex] (checking conditions)
                • Else - Actions
                  • Animation - Queue CAT_Unit[CAT_CurrentIndex]'s stand ready animation
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CAT_EndKillUnit[CAT_CurrentIndex] Equal to True
                • Then - Actions
                  • Unit - Kill CAT_Unit[CAT_CurrentIndex]
                • Else - Actions
              • Custom script: call RemoveLocation( udg_CAT_OriginLoc[udg_CAT_CurrentIndex] )
              • Unit Group - Remove CAT_Unit[CAT_CurrentIndex] from CAT_IsBeingMovedGroup
              • Set CAT_OriginLoc[CAT_CurrentIndex] = CAT_OriginLoc[CAT_MaxIndex]
              • Set CAT_Angle[CAT_CurrentIndex] = CAT_Angle[CAT_MaxIndex]
              • Set CAT_AttackType[CAT_CurrentIndex] = CAT_AttackType[CAT_MaxIndex]
              • Set CAT_AttackRange[CAT_CurrentIndex] = CAT_AttackRange[CAT_MaxIndex]
              • Set CAT_AttackNumber[CAT_CurrentIndex] = CAT_AttackNumber[CAT_MaxIndex]
              • Set CAT_CustomAttackType[CAT_CurrentIndex] = CAT_CustomAttackType[CAT_MaxIndex]
              • Set CAT_CanDamageAir[CAT_CurrentIndex] = CAT_CanDamageAir[CAT_MaxIndex]
              • Set CAT_CanDamageAir[CAT_MaxIndex] = False
              • Set CAT_ComboEnabled[CAT_CurrentIndex] = CAT_ComboEnabled[CAT_MaxIndex]
              • Set CAT_ComboEnabled[CAT_MaxIndex] = False
              • Set CAT_ComboTrigger[CAT_CurrentIndex] = CAT_ComboTrigger[CAT_MaxIndex]
              • Set CAT_DamageType[CAT_CurrentIndex] = CAT_DamageType[CAT_MaxIndex]
              • Set CAT_Damage[CAT_CurrentIndex] = CAT_Damage[CAT_MaxIndex]
              • Set CAT_DamageRadius[CAT_CurrentIndex] = CAT_DamageRadius[CAT_MaxIndex]
              • Set CAT_DamageGroup[CAT_CurrentIndex] = CAT_DamageGroup[CAT_MaxIndex]
              • Set CAT_Speed[CAT_CurrentIndex] = CAT_Speed[CAT_MaxIndex]
              • Set CAT_DistanceTraveled[CAT_CurrentIndex] = CAT_DistanceTraveled[CAT_MaxIndex]
              • Set CAT_EffectString[CAT_CurrentIndex] = CAT_EffectString[CAT_MaxIndex]
              • Set CAT_EffectAttachpoint[CAT_CurrentIndex] = CAT_EffectAttachpoint[CAT_MaxIndex]
              • Set CAT_Effect[CAT_CurrentIndex] = CAT_Effect[CAT_MaxIndex]
              • Set CAT_EndKillUnit[CAT_CurrentIndex] = CAT_EndKillUnit[CAT_MaxIndex]
              • Set CAT_EndKillUnit[CAT_MaxIndex] = False
              • Set CAT_FinalAoe[CAT_CurrentIndex] = CAT_FinalAoe[CAT_MaxIndex]
              • Set CAT_FinalAoe[CAT_MaxIndex] = False
              • Set CAT_FinalAoeEffectString[CAT_CurrentIndex] = CAT_FinalAoeEffectString[CAT_MaxIndex]
              • Set CAT_FinalAoeRadius[CAT_CurrentIndex] = CAT_FinalAoeRadius[CAT_MaxIndex]
              • Set CAT_FinalAoeDamage[CAT_CurrentIndex] = CAT_FinalAoeDamage[CAT_MaxIndex]
              • Set CAT_Homing[CAT_CurrentIndex] = CAT_Homing[CAT_MaxIndex]
              • Set CAT_Homing[CAT_MaxIndex] = False
              • Set CAT_MultipurposeReal[CAT_CurrentIndex] = CAT_MultipurposeReal[CAT_MaxIndex]
              • Set CAT_Player[CAT_CurrentIndex] = CAT_Player[CAT_MaxIndex]
              • Set CAT_Pierce[CAT_CurrentIndex] = CAT_Pierce[CAT_MaxIndex]
              • Set CAT_PeriodicCounter[CAT_CurrentIndex] = CAT_PeriodicCounter[CAT_MaxIndex]
              • Set CAT_Pierce[CAT_MaxIndex] = False
              • Set CAT_Unit[CAT_CurrentIndex] = CAT_Unit[CAT_MaxIndex]
              • Set CAT_Unit[CAT_MaxIndex] = No unit
              • Set CAT_TargetUnit[CAT_CurrentIndex] = CAT_TargetUnit[CAT_MaxIndex]
              • Set CAT_TargetUnit[CAT_MaxIndex] = No unit
              • Set CAT_MaxIndex = (CAT_MaxIndex - 1)
              • Set CAT_CurrentIndex = (CAT_CurrentIndex - 1)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • CAT_MaxIndex Equal to 0
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
Update 1 : fixed powerslam clash issue.Added the option to Kill unit at end of effect for dummy units.
Update 2 : Added new attack type circler, the unit circle around the target while attack.

Credit if you use in your map.
I may add new custom attack type overtime.

Keywords:
CAT, Custom, Attack, Type, System, MUI, Spell, Effect, Grab, Push, Charge
Contents

Custom Attack type (Map)

Reviews
12th Dec 2015 IcemanBo: For long time as NeedsFix. Rejected. 01:27, 8th Jan 2015 IcemanBo: http://www.hiveworkshop.com/forums/spells-569/cat-custom-attack-type-system-259569/#post2637296
Unit attack is just my personal use in demo map because it was my original intent and it's easier to make demo effect that way I don't have to create a dummy ability.
You can make any event you want in the trigger.
It can be on ability cast or damage event if you use dd system.
I plan on making an update with possibility to kill unit at end of effect if people want to use dummy unit missile with this system.
And I will find a way to fix double powerslam bug.
 
Last edited:
Level 29
Joined
Oct 24, 2012
Messages
6,543
Remove the and all condition block it is useless. It just slows the trigger down. The only time you need an and all block is inside an or all condition block.

Read the if condition and you will see that it says all conditions are true.
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • And - All (Conditions) are true
        • Conditions
This should be stored in a variable. (Level of Ghost (Visible) for CAT_Unit[CAT_CurrentIndex]) Greater than 0
What if the unit uses the spell then levels the ability ? It will then get the benefits of the increased level.

After reducing your max index counter you need to reduce the loop integer. Otherwise a spell index gets skipped whenever a spell is removed.
  • Set CAT_MaxIndex = (CAT_MaxIndex - 1)
  • Set CAT_CurrentIndex = (CAT_CurrentIndex - 1)
Never use Attacked unit use triggering unit instead. It is faster and more efficient.

This should be stored as it will be used more than once. (Owner of CAT_Unit[CAT_CurrentIndex]))
Also you should change this unit group and pick all units in range then sort through the units to remove. It will be more efficient, faster and easier to edit.
  • Unit Group - Remove all units of (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching ((((Matching unit) belongs to an ally of (Owner of CAT_Unit[CAT_CurrentIndex])) Equal to True) and ((Matching unit) Not equal to CAT_TargetUnit[CAT_CurrentIndex]))) from CAT_DamageGroup[CAT_CurrentIndex]
The same should be done with any unit group that uses more than one Matching unit calls.
 
This should be stored in a variable. (Level of Ghost (Visible) for CAT_Unit[CAT_CurrentIndex]) Greater than 0
What if the unit uses the spell then levels the ability ? It will then get the benefits of the increased level.
I don't think I need to store Ghost (visible) in a variable.
Ghost (visible) is an ability that do nothing but remove unit collision.It doesn't appear in command UI and has no data and have no use of stats than can be modified.
It can be leveled only through trigger and won't benefit from level anyway.

if you want a unit that has ghost visible by default and use this system then just create a new ability from it and give the custom ability instead.
Also you should change this unit group and pick all units in range then sort through the units to remove. It will be more efficient, faster and easier to edit.
  • Unit Group - Remove all units of (Units within CAT_FinalAoeRadius[CAT_CurrentIndex] of CAT_LocOffset[CAT_CurrentIndex] matching ((((Matching unit) belongs to an ally of (Owner of CAT_Unit[CAT_CurrentIndex])) Equal to True) and ((Matching unit) Not equal to CAT_TargetUnit[CAT_CurrentIndex]))) from CAT_DamageGroup[CAT_CurrentIndex]
The same should be done with any unit group that uses more than one Matching unit calls.
And for group with matching condition this is what I do.
But in that case I remove friendly units but if you target your own unit it will not remove the targeted friendly unit.I have no choice but to have 2 matching condition.
This is not 2 matching unit to remove but one remove and one not to remove.
It's either that or remove all friendly then add back target if friendly which seem less efficient than remove all friendly but target.
 
Last edited:
Level 29
Joined
Oct 24, 2012
Messages
6,543
I don't think I need to store Ghost (visible) in a variable.
Ghost (visible) is an ability that do nothing but remove unit collision.It doesn't appear in command UI and has no data and have no use of stats than can be modified.
It can be leveled only through trigger and won't benefit from level anyway.

if you want a unit that has ghost visible by default and use this system then just create a new ability from it and give the custom ability instead.

And for group with matching condition this is what I do.
But in that case I remove friendly units but if you target your own unit it will not remove the targeted friendly unit.I have no choice but to have 2 matching condition.
This is not 2 matching unit to remove but one remove and one not to remove.
It's either that or remove all friendly then add back target if friendly which seem less efficient than remove all friendly but target.

Can you quote or refer to what you are talking about. Nothing here makes sense or tells me what you are talking about.
 
  • There are like 20 triggers for your Demo. Seperate them from the system folder.
  • Your config helper seems outdated. Type "circler" is never mentioned.
  • The way you handle with add/remove crow form might bring unwanted results. Use this method: http://www.hiveworkshop.com/forums/...how-give-unit-ability-fly-201936/#post1987015
  • Filter "PickedUnit" instead of creating extra unit groups that will be removed from DamageGroup. It's highly inefficient.
  • Why does IsBeingMovedGroup even exist?
  • Your Assault-Type does use SetUnitX/Y natives without checking for WouldBounds or anything similar. It may lead to game crash.
  • Only remove Ghost ability onDeindex if unit did not have it before.
  • Unit/Target -loc don't need to be arrays.

I tested your demo, the attacks were pretty interesting.
The Blademaster did not always make his spin animation.
Some attacks stop orders for attacked unit, or temporary remove/disable it's attack. This may influence the game behaviour of enemies, not like normal wc3 attacks do.
I don't find it very easy for the user to use this system, but it might be interesting for some maps.

I don't really like all the code for all types is thrown together into one big mega loop that handles all kind of stuff with a large amount of linear checks.
An overhead is guaranteed for each iteration, multiple times. Maybe you should think of to split the types for a smarter handling. Even if this would mean extra loop, etc.

I can see you've put much effort into this system, but for now there are some points that need to be changed.

Needs Fix
 
Top