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

Knockback v1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
I understand there are other spells of its kind on the Hive, but this is the first thing I've submitted since 2008. Every knockback system I came across I didn't like. (They didn't use dynamic indexing.)

Second reason I made this is because I want to know how I did in terms of GUI triggering in general. :p

I triggered everything so it /somewhat/ makes sense to physics. (Further targets are pushed less and receive less damage. This is fully customizable of course.)

I also over-documented for anyone who's still learning triggers.


Anyway, here's some screenshots

KnockbackSpellScreenshot3_zps3841284e.jpg
KnockbackSpellScreenshot_zpse7f24922.jpg
KnockbackSpellScreenshot2_zps2beaf0d1.jpg



  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • KB_Integers[1] Equal to 0
      • Then - Actions
        • Trigger - Turn on KB Loop <gen>
      • Else - Actions
    • Set KB_temp_Point[1] = (Position of (Triggering unit))
    • Set KB_Range = 450.00
    • Set KB_temp_Group[1] = (Units within KB_Range of KB_temp_Point[1] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) is alive) Equal to Tr
    • Unit Group - Pick every unit in KB_temp_Group[1] and do (Actions)
      • Loop - Actions
        • Set KB_Integers[1] = (KB_Integers[1] + 1)
        • Set KB_Caster[KB_Integers[1]] = (Triggering unit)
        • Set KB_Damage[KB_Integers[1]] = (100.00 x (Real((Level of (Ability being cast) for KB_Caster[KB_Integers[1]]))))
        • Set KB_CatchUnits[KB_Integers[1]] = True
        • Set KB_DestroysTrees[KB_Integers[1]] = True
        • Set KB_DestructibleType[KB_Integers[1]] = Ashenvale Tree Wall
        • Set KB_TravelsCliffs[KB_Integers[1]] = False
        • Set KB_VFX[KB_Integers[1]] = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
        • Set KB_Friction[KB_Integers[1]] = 0.38
        • Set KB_Threshold[KB_Integers[1]] = 1.00
        • Set KB_Target[KB_Integers[1]] = (Picked unit)
        • Set KB_temp_Point[2] = (Position of KB_Target[KB_Integers[1]])
        • Set KB_temp_Real[1] = (1.00 - ((Distance between KB_temp_Point[1] and KB_temp_Point[2]) / KB_Range))
        • Set KB_Damage[KB_Integers[1]] = (KB_Damage[KB_Integers[1]] x KB_temp_Real[1])
        • Set KB_Speed[KB_Integers[1]] = (KB_temp_Real[1] x (400.00 + (250.00 x (Real((Level of (Ability being cast) for KB_Caster[KB_Integers[1]]))))))
        • Set KB_Angle[KB_Integers[1]] = (Angle from KB_temp_Point[1] to KB_temp_Point[2])
        • Unit - Cause KB_Caster[KB_Integers[1]] to damage KB_Target[KB_Integers[1]], dealing KB_Damage[1] damage of attack type Normal and damage type Universal
        • Set KB_TargetX[KB_Integers[1]] = (X of KB_temp_Point[2])
        • Set KB_TargetY[KB_Integers[1]] = (Y of KB_temp_Point[2])
        • Set KB_Speed[KB_Integers[1]] = (KB_Speed[KB_Integers[1]] x 0.03)
        • Set KB_VelocityX[KB_Integers[1]] = (KB_Speed[KB_Integers[1]] x (Cos(KB_Angle[KB_Integers[1]])))
        • Set KB_VelocityY[KB_Integers[1]] = (KB_Speed[KB_Integers[1]] x (Sin(KB_Angle[KB_Integers[1]])))
        • Set KB_SignX[KB_Integers[1]] = (Sign(KB_VelocityX[KB_Integers[1]]))
        • Set KB_SignY[KB_Integers[1]] = (Sign(KB_VelocityY[KB_Integers[1]]))
        • Custom script: call RemoveLocation(udg_KB_temp_Point[2])
    • Custom script: call RemoveLocation(udg_KB_temp_Point[1])
    • Custom script: call DestroyGroup(udg_KB_temp_Group[1])
  • Events
    • Time - Every 0.03 seconds of game time
  • Conditions
  • Actions
    • For each (Integer KB_Integers[2]) from 1 to KB_Integers[1], 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
                • (Abs(KB_VelocityX[KB_Integers[2]])) Less than KB_Threshold[KB_Integers[2]]
                • (Abs(KB_VelocityY[KB_Integers[2]])) Less than KB_Threshold[KB_Integers[2]]
          • Then - Actions
            • Set KB_ReOrder = True
          • Else - Actions
            • Custom script: set udg_KB_TargetX[udg_KB_Integers[2]] = (udg_KB_TargetX[udg_KB_Integers[2]] + udg_KB_VelocityX[udg_KB_Integers[2]])
            • Custom script: set udg_KB_TargetY[udg_KB_Integers[2]] = (udg_KB_TargetY[udg_KB_Integers[2]] + udg_KB_VelocityY[udg_KB_Integers[2]])
            • Set KB_temp_Point[1] = (Point(KB_TargetX[KB_Integers[2]], KB_TargetY[KB_Integers[2]]))
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • KB_DestroysTrees[KB_Integers[2]] Equal to True
              • Then - Actions
                • Destructible - Pick every destructible within 80.00 of KB_temp_Point[1] 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
                            • (Destructible-type of (Picked destructible)) Equal to KB_DestructibleType[KB_Integers[2]]
                            • ((Picked destructible) is alive) Equal to True
                      • Then - Actions
                        • Destructible - Kill (Picked destructible)
                      • Else - Actions
              • Else - Actions
                • Destructible - Pick every destructible within 80.00 of KB_temp_Point[1] 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
                            • (Destructible-type of (Picked destructible)) Equal to KB_DestructibleType[KB_Integers[2]]
                            • ((Picked destructible) is alive) Equal to True
                      • Then - Actions
                        • Set KB_ReOrder = True
                      • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • And - All (Conditions) are true
                  • Conditions
                    • KB_TravelsCliffs[KB_Integers[2]] Equal to False
                    • (Terrain pathing at KB_temp_Point[1] of type Walkability is off) Equal to True
              • Then - Actions
                • Set KB_ReOrder = True
              • Else - Actions
                • Custom script: call SetUnitX(udg_KB_Target[udg_KB_Integers[2]], udg_KB_TargetX[udg_KB_Integers[2]])
                • Custom script: call SetUnitY(udg_KB_Target[udg_KB_Integers[2]], udg_KB_TargetY[udg_KB_Integers[2]])
                • Custom script: set udg_KB_VelocityX[udg_KB_Integers[2]] = (RAbsBJ(udg_KB_VelocityX[udg_KB_Integers[2]])) - udg_KB_Friction[udg_KB_Integers[2]]
                • Custom script: set udg_KB_VelocityY[udg_KB_Integers[2]] = (RAbsBJ(udg_KB_VelocityY[udg_KB_Integers[2]])) - udg_KB_Friction[udg_KB_Integers[2]]
                • Custom script: set udg_KB_VelocityX[udg_KB_Integers[2]] = udg_KB_VelocityX[udg_KB_Integers[2]] * udg_KB_SignX[udg_KB_Integers[2]]
                • Custom script: set udg_KB_VelocityY[udg_KB_Integers[2]] = udg_KB_VelocityY[udg_KB_Integers[2]] * udg_KB_SignY[udg_KB_Integers[2]]
                • Special Effect - Create a special effect attached to the origin of KB_Target[KB_Integers[2]] using KB_VFX[KB_Integers[2]]
                • Special Effect - Destroy (Last created special effect)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • KB_CatchUnits[KB_Integers[2]] Equal to True
              • Then - Actions
                • Set KB_temp_Point[2] = (Position of KB_Target[KB_Integers[2]])
                • Set KB_temp_Group[1] = (Units within 60.00 of KB_temp_Point[2] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) is alive) Equal to True)
                • Unit Group - Pick every unit in KB_temp_Group[1] and do (Actions)
                  • Loop - Actions
                    • For each (Integer KB_Integers[3]) from 1 to KB_Integers[1], do (Actions)
                      • Loop - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • (Picked unit) Equal to KB_Target[KB_Integers[3]]
                          • Then - Actions
                            • Unit Group - Remove (Picked unit) from KB_temp_Group[1]
                          • Else - Actions
                • Unit Group - Pick every unit in KB_temp_Group[1] and do (Actions)
                  • Loop - Actions
                    • Set KB_Integers[1] = (KB_Integers[1] + 1)
                    • Set KB_Caster[KB_Integers[1]] = KB_Caster[KB_Integers[2]]
                    • Set KB_CatchUnits[KB_Integers[1]] = KB_CatchUnits[KB_Integers[2]]
                    • Set KB_DestroysTrees[KB_Integers[1]] = KB_DestroysTrees[KB_Integers[2]]
                    • Set KB_DestructibleType[KB_Integers[1]] = KB_DestructibleType[KB_Integers[2]]
                    • Set KB_TravelsCliffs[KB_Integers[1]] = KB_TravelsCliffs[KB_Integers[2]]
                    • Set KB_VFX[KB_Integers[1]] = KB_VFX[KB_Integers[2]]
                    • Set KB_Friction[KB_Integers[1]] = KB_Friction[KB_Integers[2]]
                    • Set KB_Threshold[KB_Integers[1]] = KB_Threshold[KB_Integers[2]]
                    • Set KB_Target[KB_Integers[1]] = (Picked unit)
                    • Set KB_temp_Point[3] = (Position of KB_Target[KB_Integers[1]])
                    • Set KB_Angle[KB_Integers[1]] = (Angle from KB_temp_Point[1] to KB_temp_Point[3])
                    • Set KB_temp_Real[1] = (KB_Speed[KB_Integers[2]] x (Cos(KB_Angle[KB_Integers[2]])))
                    • Set KB_temp_Real[2] = (KB_Speed[KB_Integers[2]] x (Sin(KB_Angle[KB_Integers[2]])))
                    • Set KB_temp_Real[2] = (KB_temp_Real[1] x KB_temp_Real[2])
                    • Set KB_temp_Real[1] = (KB_VelocityY[KB_Integers[2]] x KB_VelocityX[KB_Integers[2]])
                    • Set KB_temp_Real[1] = (KB_temp_Real[1] / KB_temp_Real[2])
                    • Set KB_Damage[KB_Integers[2]] = (KB_Damage[KB_Integers[1]] x KB_temp_Real[1])
                    • Unit - Cause KB_Caster[KB_Integers[1]] to damage KB_Target[KB_Integers[1]], dealing KB_Damage[1] damage of attack type Normal and damage type Universal
                    • Set KB_TargetX[KB_Integers[1]] = (X of KB_temp_Point[3])
                    • Set KB_TargetY[KB_Integers[1]] = (Y of KB_temp_Point[3])
                    • Set KB_VelocityX[KB_Integers[1]] = (KB_VelocityX[KB_Integers[2]] x (Cos(KB_Angle[KB_Integers[1]])))
                    • Set KB_VelocityY[KB_Integers[1]] = (KB_VelocityY[KB_Integers[2]] x (Sin(KB_Angle[KB_Integers[1]])))
                    • Set KB_VelocityX[KB_Integers[2]] = (KB_VelocityX[KB_Integers[2]] x 0.50)
                    • Set KB_VelocityY[KB_Integers[2]] = (KB_VelocityY[KB_Integers[2]] x 0.50)
                    • Custom script: call RemoveLocation(udg_KB_temp_Point[3])
                • Custom script: call DestroyGroup(udg_KB_temp_Group[1])
                • Custom script: call RemoveLocation(udg_KB_temp_Point[2])
              • Else - Actions
            • Custom script: call RemoveLocation(udg_KB_temp_Point[1])
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • KB_ReOrder Equal to True
          • Then - Actions
            • Set KB_Caster[KB_Integers[2]] = No unit
            • Set KB_Target[KB_Integers[2]] = No unit
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • KB_Integers[1] Equal to 1
              • Then - Actions
                • Set KB_Integers[1] = 0
                • Trigger - Turn off (This trigger)
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • KB_Integers[2] Equal to KB_Integers[1]
                  • Then - Actions
                    • Set KB_Integers[1] = (KB_Integers[1] - 1)
                  • Else - Actions
                    • Set KB_temp_Integer[1] = KB_Integers[2]
                    • Set KB_temp_Integer[2] = (KB_Integers[2] + 1)
                    • For each (Integer A) from KB_Integers[2] to KB_Integers[1], do (Actions)
                      • Loop - Actions
                        • Set KB_Caster[KB_temp_Integer[1]] = KB_Caster[KB_temp_Integer[2]]
                        • Set KB_DestroysTrees[KB_temp_Integer[1]] = KB_DestroysTrees[KB_temp_Integer[2]]
                        • Set KB_DestructibleType[KB_temp_Integer[1]] = KB_DestructibleType[KB_temp_Integer[2]]
                        • Set KB_TravelsCliffs[KB_temp_Integer[1]] = KB_TravelsCliffs[KB_temp_Integer[2]]
                        • Set KB_CatchUnits[KB_temp_Integer[1]] = KB_CatchUnits[KB_temp_Integer[2]]
                        • Set KB_VFX[KB_temp_Integer[1]] = KB_VFX[KB_temp_Integer[2]]
                        • Set KB_Speed[KB_temp_Integer[1]] = KB_Speed[KB_temp_Integer[2]]
                        • Set KB_Damage[KB_temp_Integer[1]] = KB_Damage[KB_temp_Integer[2]]
                        • Set KB_Friction[KB_temp_Integer[1]] = KB_Friction[KB_temp_Integer[2]]
                        • Set KB_Threshold[KB_temp_Integer[1]] = KB_Threshold[KB_temp_Integer[2]]
                        • Set KB_Target[KB_temp_Integer[1]] = KB_Target[KB_temp_Integer[2]]
                        • Set KB_TargetX[KB_temp_Integer[1]] = KB_TargetX[KB_temp_Integer[2]]
                        • Set KB_TargetY[KB_temp_Integer[1]] = KB_TargetY[KB_temp_Integer[2]]
                        • Set KB_Angle[KB_temp_Integer[1]] = KB_Angle[KB_temp_Integer[2]]
                        • Set KB_VelocityX[KB_temp_Integer[1]] = KB_VelocityX[KB_temp_Integer[2]]
                        • Set KB_VelocityY[KB_temp_Integer[1]] = KB_VelocityY[KB_temp_Integer[2]]
                        • Set KB_SignX[KB_temp_Integer[1]] = KB_SignX[KB_temp_Integer[2]]
                        • Set KB_SignY[KB_temp_Integer[1]] = KB_SignY[KB_temp_Integer[2]]
                    • Set KB_temp_Integer[1] = 0
                    • Set KB_temp_Integer[2] = 0
                    • Set KB_Integers[1] = (KB_Integers[1] - 1)
                    • Set KB_Integers[2] = (KB_Integers[2] - 1)
            • Set KB_ReOrder = False
          • Else - Actions
Here's the cast trigger but with the documentation
  • Actions
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- What all the actions do is explained here. --------
    • -------- You can obviously change them all to your needs. --------
    • -------- Though I recommend for this specific spell effect you keep some the same. --------
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- --------
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- This turns on the system loop trigger if there is no knockback in process. --------
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • KB_Integers[1] Equal to 0
      • Then - Actions
        • Trigger - Turn on KB Loop <gen>
      • Else - Actions
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- --------
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- This should be set to the point where you want the knockback to originate from. --------
    • Set KB_temp_Point[1] = (Position of (Triggering unit))
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- --------
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- This is the range of the area of effect. --------
    • Set KB_Range = 450.00
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- --------
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- This is group that will be targeted for this spell. --------
    • -------- --------
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • Set KB_temp_Group[1] = (Units within KB_Range of KB_temp_Point[1] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is A ground unit) Equal to True) and ((((Matching unit) is alive) Equal to Tr
    • -------- --------
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- We pick every unit in the group because we want to apply the knockback to EVERY unit in the target group. --------
    • Unit Group - Pick every unit in KB_temp_Group[1] and do (Actions)
      • Loop - Actions
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This registers the index of the process. (DO NOT CHANGE) --------
        • Set KB_Integers[1] = (KB_Integers[1] + 1)
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This registers who will deal the damage. --------
        • Set KB_Caster[KB_Integers[1]] = (Triggering unit)
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This registers the base amount of damage the ability should deal. --------
        • Set KB_Damage[KB_Integers[1]] = (100.00 x (Real((Level of (Ability being cast) for KB_Caster[KB_Integers[1]]))))
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- Setting this to True will make it so that enemies that get knocked back into their allies who are not being knocked back, get the effect applied. --------
        • Set KB_CatchUnits[KB_Integers[1]] = True
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- If you want this ability to destroy a certain destructible, set this to True. --------
        • -------- If set to false, destructibles will stop the knockback effect. --------
        • Set KB_DestroysTrees[KB_Integers[1]] = True
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- Set this to the type of destructible you want this ability to consider. --------
        • Set KB_DestructibleType[KB_Integers[1]] = Ashenvale Tree Wall
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- If set to True, targets travel over cliffs. If False, cliffs will stop the knockback effect. --------
        • Set KB_TravelsCliffs[KB_Integers[1]] = False
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This is the effect shown on a unit as it is under the knockback effect. --------
        • Set KB_VFX[KB_Integers[1]] = Abilities\Weapons\AncientProtectorMissile\AncientProtectorMissile.mdl
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This value dictates the decline in speed over time. (I RECOMMEND KEEPING IT BETWEEN 0 - 1) --------
        • Set KB_Friction[KB_Integers[1]] = 0.38
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This is the cut-off value. Any units that move slower than for example '1' unit per instance will be freed of the knockback. --------
        • Set KB_Threshold[KB_Integers[1]] = 1.00
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This determines who the knockback should be applied to. --------
        • Set KB_Target[KB_Integers[1]] = (Picked unit)
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This determines the position (and ultimately angle of travel) of the target. --------
        • Set KB_temp_Point[2] = (Position of KB_Target[KB_Integers[1]])
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This is a temporary variable I used to get the percentage needed hereafter. --------
        • Set KB_temp_Real[1] = (1.00 - ((Distance between KB_temp_Point[1] and KB_temp_Point[2]) / KB_Range))
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- Here I redefine the damage value adjusted to how far the target is from the caster. --------
        • Set KB_Damage[KB_Integers[1]] = (KB_Damage[KB_Integers[1]] x KB_temp_Real[1])
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- Here we define the speed. I set it so it would be affected by range again. (Set flat values if you don't want the distance between the caster and the target to be a factor.) --------
        • Set KB_Speed[KB_Integers[1]] = (KB_temp_Real[1] x (400.00 + (250.00 x (Real((Level of (Ability being cast) for KB_Caster[KB_Integers[1]]))))))
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This calculates the angle between the origin of the knockback and the target point of the knockback. (For a knockback, I recommend leaving this as is.) --------
        • Set KB_Angle[KB_Integers[1]] = (Angle from KB_temp_Point[1] to KB_temp_Point[2])
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This is where the actual damage is applied to a target. --------
        • Unit - Cause KB_Caster[KB_Integers[1]] to damage KB_Target[KB_Integers[1]], dealing KB_Damage[KB_Integers[1]] damage of attack type Normal and damage type Universal
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This registers the current position X of the target on the map. (DO NOT CHANGE THIS). --------
        • Set KB_TargetX[KB_Integers[1]] = (X of KB_temp_Point[2])
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This registers the current position Y of the target on the map. (DO NOT CHANGE THIS). --------
        • Set KB_TargetY[KB_Integers[1]] = (Y of KB_temp_Point[2])
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This adjusts the speed appropriately. (DO NOT CHANGE THIS) --------
        • Set KB_Speed[KB_Integers[1]] = (KB_Speed[KB_Integers[1]] x 0.03)
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This determines the velocity of travel along the x axis. (DO NOT CHANGE THIS). --------
        • Set KB_VelocityX[KB_Integers[1]] = (KB_Speed[KB_Integers[1]] x (Cos(KB_Angle[KB_Integers[1]])))
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- This determines the velocity of travel along the y axis. (DO NOT CHANGE THIS). --------
        • Set KB_VelocityY[KB_Integers[1]] = (KB_Speed[KB_Integers[1]] x (Sin(KB_Angle[KB_Integers[1]])))
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- --------
        • -------- -------------------------------------------------------------------------------------------------------------- --------
        • -------- Here we remove leaks. --------
        • Custom script: call RemoveLocation(udg_KB_temp_Point[2])
        • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- --------
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- Here we remove leaks. --------
    • Custom script: call RemoveLocation(udg_KB_temp_Point[1])
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- --------
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- Here we remove leaks. --------
    • Custom script: call DestroyGroup(udg_KB_temp_Group[1])
    • -------- -------------------------------------------------------------------------------------------------------------- --------
    • -------- --------
CURRENTLY UPDATING

Keywords:
knockback, push, pull, daredeamon, force
Contents

Daredeamon_Knockback (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Knockback v1.0 | Reviewed by Maker | 2nd Jun 2013 NEEDS FIX There is no proper pathing detection The tree detection method is not good The spell database already has...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.


Knockback v1.0 | Reviewed by Maker | 2nd Jun 2013
NEEDS FIX


126248-albums6177-picture66522.png


  • There is no proper pathing detection
  • The tree detection method is not good

    The spell database already has pretty good knockback systems.
    Unless you can create something exceptionally good, you have low
    chance of getting a (yet another) knocback system approved
126248-albums6177-picture66524.png
[tr]
 
Level 8
Joined
Dec 22, 2008
Messages
207
No it's not. It's more efficient than any Hive GUI trigger I've seen before. The reason the entire trigger is long is because I give the user the 3 extra choices, instead of having them as fixed choices. (CatchUnits, DestroysTrees, and TravelCliffs)
>_> Also, as for the indexing, if you mean splitting the system into 3 parts (cast, init and loop trigger) and determining available indexes in the initialization trigger, then you're increasing your variables by two (since you need your cast trigger variables without arrays + system variables with arrays), and increasing the amount of triggers by 33.33%. (Versus a little length on the end of the loop trigger of my code).

EDIT:
I just checked out your tut. First thing I noticed is that your variables names are a pain to read. There's no organization in them (like prefixes and capitalization etc.) which is something you do want if you have multiple systems, and thus something you SHOULD teach. Also, forgive me if I'm wrong, sincerely, it's currently 10.22 AM and I have not closed my eyes yet, but your indexing seems to not take in account the order of index. All you seem to do is subtract the last index. For spell effects which do not define time as a constant, you need to remember the order.

EDIT: Also, I just realized you didn't mean what I said before about the determining available indexes in the initialization trigger, because I can't find any evidence of you doing so at all. Any decent spell should be able to end the effect early/late if needed, and still reorder indexes properly. I don't see that in your tut. Again, forgive me if I'm wrong. I haven't slept.

EDIT: Yeah so I just read your nova ability example a couple of times, and you don't index it efficiently. Your loop trigger will keep iterating through every instance of the ability casted (somewhat) simultaneously, and will only turn off as soon as the index is 0, and only THEN set the "maxindex" to 0. Mine does it dynamically, ergo it is more efficient.


RESOLVED. With that, I thank Velgen for helping me understand deathismyfriend for helping me understand indexing better yet again.
 
Last edited:
Level 29
Joined
Oct 24, 2012
Messages
6,543
sry but no the method i use is the most efficient method.

when u index u store it into variables
example:
  • Set maxIndex = maxIndex + 1
  • Set caster[ maxIndex] = triggering unit
  • Set target[ maxIndex] = targeted unit
then the rest of the spell variables. This is just an example
now to de-index u do this
  • Set caster[ tempInt] = caster[ maxIndex]
  • Set caster[ maxIndex] = no unit
  • Set target[ tempInt] = target[ maxIndex]
  • Set target[ maxIndex] = no unit
  • Set maxIndex = maxIndex - 1
  • Set tempInt = tempInt - 1
That is how u de-index. It works by taking the last index in the array and storing it in the now unused index. then u null and destroy the last index then lower the max index.

It is the most efficient way because u dont loop through unused indexes. and everything stays 100% MUI

As for the way i write my variables i use standard format for variables.
 
Level 8
Joined
Dec 22, 2008
Messages
207
sry but no the method i use is the most efficient method.

when u index u store it into variables
example:
  • Set maxIndex = maxIndex + 1
  • Set caster[ maxIndex] = triggering unit
  • Set target[ maxIndex] = targeted unit
then the rest of the spell variables. This is just an example
now to de-index u do this
  • Set caster[ tempInt] = caster[ maxIndex]
  • Set caster[ maxIndex] = no unit
  • Set target[ tempInt] = target[ maxIndex]
  • Set target[ maxIndex] = no unit
  • Set maxIndex = maxIndex - 1
  • Set tempInt = tempInt - 1
That is how u de-index. It works by taking the last index in the array and storing it in the now unused index. then u null and destroy the last index then lower the max index.

It is the most efficient way because u dont loop through unused indexes. and everything stays 100% MUI

.... Dude. Read my triggers complete and through next time. It is exactly the same concept, I applied it just slightly different but I do the exact same.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
i dont understand y u do this.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • KB_Integers[2] Equal to KB_Integers[1]
  • Then - Actions
  • Set KB_Integers[1] = (KB_Integers[1] - 1)
  • Else - Actions
  • Set KB_temp_Integer[1] = KB_Integers[2]
  • Set KB_temp_Integer[2] = (KB_Integers[2] + 1)
  • For each (Integer A) from KB_Integers[2] to KB_Integers[1], do (Actions)
  • Loop - Actions
  • Set KB_Caster[KB_temp_Integer[1]] = KB_Caster[KB_temp_Integer[2]]
  • Set KB_DestroysTrees[KB_temp_Integer[1]] = KB_DestroysTrees[KB_temp_Integer[2]]
  • Set KB_DestructibleType[KB_temp_Integer[1]] = KB_DestructibleType[KB_temp_Integer[2]]
  • Set KB_TravelsCliffs[KB_temp_Integer[1]] = KB_TravelsCliffs[KB_temp_Integer[2]]
  • Set KB_CatchUnits[KB_temp_Integer[1]] = KB_CatchUnits[KB_temp_Integer[2]]
  • Set KB_VFX[KB_temp_Integer[1]] = KB_VFX[KB_temp_Integer[2]]
  • Set KB_Speed[KB_temp_Integer[1]] = KB_Speed[KB_temp_Integer[2]]
  • Set KB_Damage[KB_temp_Integer[1]] = KB_Damage[KB_temp_Integer[2]]
  • Set KB_Friction[KB_temp_Integer[1]] = KB_Friction[KB_temp_Integer[2]]
  • Set KB_Threshold[KB_temp_Integer[1]] = KB_Threshold[KB_temp_Integer[2]]
  • Set KB_Target[KB_temp_Integer[1]] = KB_Target[KB_temp_Integer[2]]
  • Set KB_TargetX[KB_temp_Integer[1]] = KB_TargetX[KB_temp_Integer[2]]
  • Set KB_TargetY[KB_temp_Integer[1]] = KB_TargetY[KB_temp_Integer[2]]
  • Set KB_Angle[KB_temp_Integer[1]] = KB_Angle[KB_temp_Integer[2]]
  • Set KB_VelocityX[KB_temp_Integer[1]] = KB_VelocityX[KB_temp_Integer[2]]
  • Set KB_VelocityY[KB_temp_Integer[1]] = KB_VelocityY[KB_temp_Integer[2]]
  • Set KB_SignX[KB_temp_Integer[1]] = KB_SignX[KB_temp_Integer[2]]
  • Set KB_SignY[KB_temp_Integer[1]] = KB_SignY[KB_temp_Integer[2]]
Also get rid of the and conditions. Only time u need them is when u use an and condition inside an or condition.

if u de-index like me i just dont see it
 
Level 8
Joined
Dec 22, 2008
Messages
207
i dont understand y u do this.

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • KB_Integers[2] Equal to KB_Integers[1]
  • Then - Actions
  • Set KB_Integers[1] = (KB_Integers[1] - 1)
  • Else - Actions
  • Set KB_temp_Integer[1] = KB_Integers[2]
  • Set KB_temp_Integer[2] = (KB_Integers[2] + 1)
  • For each (Integer A) from KB_Integers[2] to KB_Integers[1], do (Actions)
  • Loop - Actions
  • Set KB_Caster[KB_temp_Integer[1]] = KB_Caster[KB_temp_Integer[2]]
  • Set KB_DestroysTrees[KB_temp_Integer[1]] = KB_DestroysTrees[KB_temp_Integer[2]]
  • Set KB_DestructibleType[KB_temp_Integer[1]] = KB_DestructibleType[KB_temp_Integer[2]]
  • Set KB_TravelsCliffs[KB_temp_Integer[1]] = KB_TravelsCliffs[KB_temp_Integer[2]]
  • Set KB_CatchUnits[KB_temp_Integer[1]] = KB_CatchUnits[KB_temp_Integer[2]]
  • Set KB_VFX[KB_temp_Integer[1]] = KB_VFX[KB_temp_Integer[2]]
  • Set KB_Speed[KB_temp_Integer[1]] = KB_Speed[KB_temp_Integer[2]]
  • Set KB_Damage[KB_temp_Integer[1]] = KB_Damage[KB_temp_Integer[2]]
  • Set KB_Friction[KB_temp_Integer[1]] = KB_Friction[KB_temp_Integer[2]]
  • Set KB_Threshold[KB_temp_Integer[1]] = KB_Threshold[KB_temp_Integer[2]]
  • Set KB_Target[KB_temp_Integer[1]] = KB_Target[KB_temp_Integer[2]]
  • Set KB_TargetX[KB_temp_Integer[1]] = KB_TargetX[KB_temp_Integer[2]]
  • Set KB_TargetY[KB_temp_Integer[1]] = KB_TargetY[KB_temp_Integer[2]]
  • Set KB_Angle[KB_temp_Integer[1]] = KB_Angle[KB_temp_Integer[2]]
  • Set KB_VelocityX[KB_temp_Integer[1]] = KB_VelocityX[KB_temp_Integer[2]]
  • Set KB_VelocityY[KB_temp_Integer[1]] = KB_VelocityY[KB_temp_Integer[2]]
  • Set KB_SignX[KB_temp_Integer[1]] = KB_SignX[KB_temp_Integer[2]]
  • Set KB_SignY[KB_temp_Integer[1]] = KB_SignY[KB_temp_Integer[2]]
Also get rid of the and conditions. Only time u need them is when u use an and condition inside an or condition.

THAT is my deindexing and reordering. The reason you can't see it is because you name your variables like you name your jass... Probably. In any case, it's not organized optimally that way. MY way you can see exactly what's going on and by using the temporary integer I make the system more flexible. And it's still efficient.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
that de-indexing does not make sense and is less efficient. U should de-index in the loop ur doing it and when de-indexing u should not need a second loop as u need the index for the loop u are on atm and the maxIndex.

Also again i use standard naming for variables. That isnt whats the problem tho. Its the way u de-index.
 
Level 8
Joined
Dec 22, 2008
Messages
207
.... *non-expressive sigh*

If you look at the second loop for just about a minute it won't be hard to derive that I'm basically taking out whatever index has ended, taking all the indexes that came after that, and setting them one index down. This effectively takes out just THAT index, no matter if it's the first, the second, the third, or so on.

What you do is you just take the final index, and set the new unit to that index, but it doesn't take in account the actual order in specific units were indexed. The reason I made my indexing system to be able to extract specific indexes and reorder the rest is so it would dynamically recycle them. All you do is put them on the end, and set the trigger to 'off' if the max int is equal to 0.
 
Level 8
Joined
Dec 22, 2008
Messages
207
@deathismyfriend

Just to clarify, this system uses very specific measures at which it will take out a specific index and reorder all the next ones one index down.
The deindexing only happens in an iteration if (for example) the speed becomes less than the threshold. This specific trigger does not register time, nor distance, but rather the velocity of x/y under a certain threshold. The threshold only being there to eliminate the ugly aesthetics of the spell when the speed drops below 1.
Two other cases are if DestroysTrees is set to false, and it hits a destructible. The second of those is when it hits a wall.
These three cases are the only thing that will cause a reordering of the indexes.

I will take out the and condition for that though, for that one you are correct.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
man watchu watchu u doin ya don cheadle lookin eisssh.
Whatchu? Watchu wan?! Just comin here for attention u self important "my way is the only way" lookin eiisshh.

its not my way lol. its just the most efficient way.
Also no reason to be rude lol. I reported that post btw

@TO
when u re-order everything it is a ton less efficient than the method i use. Also it has a high chance of hitting the op-limit which wil break ur spell.
 
Level 8
Joined
Dec 22, 2008
Messages
207
its not my way lol. its just the most efficient way.

@TO
when u re-order everything it is a ton less efficient than the method i use. Also it has a high chance of hitting the op-limit which wil break ur spell.

What do you mean hit the OP limit?

EDIT:
(Also, I edited my previous post for increased clarification).
Second, I still don't think you understand exactly what my system does. :p It's made to prevent exactly that.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
What do you mean hit the OP limit?

when u re-order every instance of the spell it takes a lot of programming speed and power. There are only a certain amount of actions one thread can do b4 it hits the op-limit. ( the operational limit of wc3) After it hits the op-limit every action after that will not run.

Also specific measurements are ok to use and u dont need to keep things in order to keep the measurements in order. Reals are also not 100 percent exact so if u use any equal to real it can be buggy.
 
Level 1
Joined
May 28, 2013
Messages
4
its not my way lol. its just the most efficient way.
Also no reason to be rude lol. I reported that post btw

@TO
when u re-order everything it is a ton less efficient than the method i use. Also it has a high chance of hitting the op-limit which wil break ur spell.

maaan so sensitive maaaan take it maaan pls take
 
Level 8
Joined
Dec 22, 2008
Messages
207
when u re-order every instance of the spell it takes a lot of programming speed and power. There are only a certain amount of actions one thread can do b4 it hits the op-limit. ( the operational limit of wc3) After it hits the op-limit every action after that will not run.

Against, this is exactly what my system prevents. Basically what I'm doing is I'm decreasing the equivalent of your 'maxint' by 1 every time the effect on a unit is supposed to end... Ultimately decreasing performance required per iteration of the periodic loop. :p Seriously, please read my triggers properly. A few posts ago you were still saying "I don't get why you do this."

Besides, all I did there was nest ONE loop. ONE loop which I am reducing the loop per iteration for as soon as it's physically possible.

EDIT
Which is something I saw in your tutorial btw, just below the "how to index" section. (Nesting loops)
 
Level 8
Joined
Dec 22, 2008
Messages
207
not sensitive thats just a pointless and rude post. There was no reason to make it. I wont drop to ur lvl and continue this. Im trying to help ppl improve there spells / systems / whatever they need. So if u dont have anything to help just dont post.

You haven't helped me improve anything. All you've done is talk down to me and you haven't even tried to understand my triggers.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
if u re-order by setting stuff from index 2 to 1 then index 3 to 2 then 4 to 3 it will hit op-limit and will never be approved. It will hit the op-limit. It does not protect against it. And it will hurt performance and efficiency a lot.

I havent tlked down to u at all. Just trying to help. It is less efficient and im trying to explain y. Also that was pretty rude to make a new account just to say that.
Im trying to explain y ur method is flawed. If i sound rude or tlking down im not its just the typing lol.
 
Level 1
Joined
May 28, 2013
Messages
4
not sensitive thats just a pointless and rude post. There was no reason to make it. I wont drop to ur lvl and continue this. Im trying to help ppl improve there spells / systems / whatever they need. So if u dont have anything to help just dont post.
just ignore me then pal, cmon man dont drop to my level. sigh im disappointed.
jesus gave me the right to post, so i will type and click the "post" button as i please. and my comments aren't rude, they speak the truth man, i swears. u aint trying to help nobody man, u just annoying the guy. im so scared pls help me too
 
Level 8
Joined
Dec 22, 2008
Messages
207
if u re-order by setting stuff from index 2 to 1 then index 3 to 2 then 4 to 3 it will hit op-limit and will never be approved. It will hit the op-limit. It does not protect against it. And it will hurt performance and efficiency a lot.

Nope. You're lying through your teeth. The OP limit is not that low. One, because I've spammed this system with longer runtimes and sent debug messages, it kept track perfectly. Also, you know you're lying because we use loops to keep track of all the units affected by our spells. You do it too. "for every tempint from 1 to maxint"- do multiple actions. We do this to keep track of our spell progression per instance. With my dynamic system, spell effects hardly go above 15 (since by then the index for that would have been reduced already. ) In fact, with my other projectile system, I spammed a non-cooldown ability with 3 units and couldn't even get past 8 processes being run at a given time. Anyway, nesting is a viable way to trigger. That's my 3rd reason for proof you're lying through your teeth. If you've changed your mind about that, at least take it out of your tutorial.

EDIT: Another piece of evidence... I use a trigger with probably about 6 times as many lines as this system. In Enter the Pit, one of my maps. Actually the only one I've ever uploaded. In any case, in that map, there's at least 30 projectiles with nested loops running. So stop lying. Please. It's pathetic.
 
Level 29
Joined
Oct 24, 2012
Messages
6,543
Nope. You're lying through your teeth. The OP limit is not that low. One, because I've spammed this system with longer runtimes and sent debug messages, it kept track perfectly. Also, you know you're lying because we use loops to keep track of all the units affected by our spells. You do it too. "for every tempint from 1 to maxint"- do multiple actions. We do this to keep track of our spell progression per instance. With my dynamic system, spell effects hardly go above 15 (since by then the index for that would have been reduced already. ) In fact, with my other projectile system, I spammed a non-cooldown ability with 3 units and couldn't even get past 8 processes being run at a given time. Anyway, nesting is a viable way to trigger. That's my 3rd reason for proof you're lying through your teeth. If you've changed your mind about that, at least take it out of your tutorial.

good luck. just wait for a mod to tell u ur method is completely flawed and shouldnt be used. Also im not lying.

btw I didnt say the op-limit was that low. I never even said how low or high it was. 15 indexes wont nearly be high enough for op-limit tho.
 
Last edited by a moderator:
Level 8
Joined
Dec 22, 2008
Messages
207
good luck. just wait for a mod to tell u ur method is completely flawed and shouldnt be used. Also im not lying.
I still believe you haven't read my triggers and fully understood them. Not that they're hard to understand, just that you haven't taken the decency to.

man this guy's ego just doesn't give up
word.

EDIT:
btw I didnt say the op-limit was that low. I never even said how low or high it was. 15 indexes wont nearly be high enough for op-limit tho.
Yep, because my system dynamically reduces the main index, checks every time one index is taken off the main index, instead of stacking up the main index until all effects have ended, and THEN setting it to 0.

If you are telling me to do it the first of those two ways, then we are on the same page.
 
Last edited:
Hi there :D
I would like to review your Knockback System, mainly, the "Bad Things":
1) The method of destroying Trees is not that efficient. I would like to suggest to look up some safety Tree destroy methods,which I would suggest, the dummy harvest method.
2) Your Knockback is not pathing friendly.
3) Spell Generator system such as this shouldn't have any Damage Target or any effects, make the system have its own Custom Event, whereas makes the Knockback more user-friendly.


Actually, my Knockback System and Bribe's(but not that pathing friendly)are better than this(as of what the other said)
 
Level 8
Joined
Dec 22, 2008
Messages
207
Hi there :D
I would like to review your Knockback System, mainly, the "Bad Things":
1) The method of destroying Trees is not that efficient. I would like to suggest to look up some safety Tree destroy methods,which I would suggest, the dummy harvest method.
2) Your Knockback is not pathing friendly.
3) Spell Generator system such as this shouldn't have any Damage Target or any effects, make the system have its own Custom Event, whereas makes the Knockback more user-friendly.


Actually, my Knockback System and Bribe's(but not that pathing friendly)are better than this(as of what the other said)

1) Can you elaborate and clarify please? Is there another way of destroying destructibles in GUI? I would like to know.
2) My knockback is pathing friendly because I triggered it to... not get stuck? (by ending the effect on impassible terrain and on destructibles, if said destructibles are not being destroyed.)
3) What? Elaborate?
 
Level 8
Joined
Dec 22, 2008
Messages
207
1) By using the Harvest method, you would like to check this : http://www.hiveworkshop.com/forums/...e-gui-1-1-a-228385/?prev=d=list&r=20&u=Chaosy
2) Try using it in Pathing Blockers,or Structures.
3) My vJASS Knockback System(not in the Spells Section) uses the Real(value) event. Event - Variable becomes equal to(op limit) blah blah. Please check Unit Indexer or Unit Event for examples.

1) Hashtables ARE slower than variables, am I correct? Not saying that it makes this point invalid, per se... But ehh.
2) I customized this system for grotx (the first commenter), for who that would come in handy, but I thought I took it out. Basically if DestroyTrees was equal to TRUE, it would destroy whatever given variable, but also move through them rendering them ineffective in terms of blocking altogether. If it was set to FALSE, all destructibles would stop the knockback effect.
3)This is GUI triggering. Also, the system doesn't reach op limit, I tested its functionality, and it handles fine.

As for what you said in chat, I don't see what he's trying to say?

EDIT
STOP, HOLD UP
I get it. I get what deathismyfriend was trying to say. I've been chatting with Vergen for over an hour. He explained to delirious, sleep deprived me what I was doing. I'll be updating the system ASAP.
 
Last edited:
Level 37
Joined
Mar 6, 2006
Messages
9,240
just ignore me then pal, cmon man dont drop to my level. sigh im disappointed.
jesus gave me the right to post, so i will type and click the "post" button as i please. and my comments aren't rude, they speak the truth man, i swears. u aint trying to help nobody man, u just annoying the guy. im so scared pls help me too

Maybe this jesus guy gave you the right to post, but there are people here that can take that right away. Deathismyfriend is trying to help Daredeamon to improve his triggering and is giving the correct advice.

Try to stay constructive and not act childish. Refrain from personal insults. This applies to everyone.
 
@Almia: It's not about efficiency in this particular case, but rather safety and accuracy. :p
The harvest method allows you to pinpoint trees almost as accurately as possible with little to no work from the user.

@Nizarozoid deathismyfriend is investing time into helping Daredeamon improve the triggers so the site could have better resources. There are rules that people must abide by when submitting resources and there is a well-defined list of standards that people need to live up to when making resources and posting them here. We can only approve good to high quality resources. What would be the point of a resource section if people posted crap that got approved all the time? It would be more like a "LOOK WHAT I DID" section rather than a proper database of resources that meet user expectations decently.
 
Last edited:
1) Hashtables ARE slower than variables, am I correct? Not saying that it makes this point invalid, per se... But ehh.
2) I customized this system for grotx (the first commenter), for who that would come in handy, but I thought I took it out. Basically if DestroyTrees was equal to TRUE, it would destroy whatever given variable, but also move through them rendering them ineffective in terms of blocking altogether. If it was set to FALSE, all destructibles would stop the knockback effect.
3)This is GUI triggering. Also, the system doesn't reach op limit, I tested its functionality, and it handles fine.

As for what you said in chat, I don't see what he's trying to say?

EDIT
STOP, HOLD UP
I get it. I get what deathismyfriend was trying to say. I've been chatting with Vergen for over an hour. He explained to delirious, sleep deprived me what I was doing. I'll be updating the system ASAP.
1) Correct
2) Because checking every type of destructable is not friendly,its better to use the Harvest method,because its much shorter and faster.
3)The oplimit im talking about is this:
JASS:
    constant limitop LESS_THAN                              = ConvertLimitOp(0)

    constant limitop LESS_THAN_OR_EQUAL                     = ConvertLimitOp(1)

    constant limitop EQUAL                                  = ConvertLimitOp(2)

    constant limitop GREATER_THAN_OR_EQUAL                  = ConvertLimitOp(3)

    constant limitop GREATER_THAN                           = ConvertLimitOp(4)

    constant limitop NOT_EQUAL                              = ConvertLimitOp(5)
OH sorry my bad,it was limitop XD
 
Level 8
Joined
Dec 22, 2008
Messages
207
1) Correct
2) Because checking every type of destructable is not friendly,its better to use the Harvest method,because its much shorter and faster.
3)The oplimit im talking about is this:
JASS:
    constant limitop LESS_THAN                              = ConvertLimitOp(0)

    constant limitop LESS_THAN_OR_EQUAL                     = ConvertLimitOp(1)

    constant limitop EQUAL                                  = ConvertLimitOp(2)

    constant limitop GREATER_THAN_OR_EQUAL                  = ConvertLimitOp(3)

    constant limitop GREATER_THAN                           = ConvertLimitOp(4)

    constant limitop NOT_EQUAL                              = ConvertLimitOp(5)
OH sorry my bad,it was limitop XD
I still don't know what you're asking me to do with this 'limitop' xD.

But I'm implementing the harvest method as we speak. o:
 
Top