1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. The Melee Mapping Contest #4: 2v2 - Results are out! Step by to congratulate the winners!
    Dismiss Notice
  3. We're hosting the 15th Mini-Mapping Contest with YouTuber Abelhawk! The contestants are to create a custom map that uses the hidden content within Warcraft 3 or is inspired by any of the many secrets within the game.
    Dismiss Notice
  4. The 20th iteration of the Terraining Contest is upon us! Join and create exquisite Water Structures for it.
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice

Meat Hook System [GUI] v4.2

Submitted by NightSkyAurora
This bundle is marked as approved. It works and satisfies the submission rules.
This system basically allows a caster to launch a head towards a target point with a chain attach to it. It has many features that allows you to create a meathook, grapple or similar spell very easily.

Main triggers

  • Meathook ini
    • Events
    • Conditions
    • Actions
      • Set MeatHCount = (MeatHCount + 1)
      • Set Temp_Unit = (Triggering unit)
      • Set Temp_Point = (Position of Temp_Unit)
      • Set MeatHNewPoint = (Temp_Point offset by Config_MeatHStartOffset towards Config_MeatHAngle degrees)
      • Unit - Create 1 dummy for Neutral Passive at MeatHNewPoint facing Config_MeatHAngle degrees
      • Set MeatHRef = (Custom value of (Last created unit))
      • Set MeatHSpell[MeatHRef] = Config_MeatHSpell
      • Animation - Change UDexUnits[MeatHRef]'s size to (Config_MeatHHeadScale%, Config_MeatHHeadScale%, Config_MeatHHeadScale%) of its original size
      • Unit Group - Add UDexUnits[MeatHRef] to MeatHHeads
      • Set MeatHChainModel[MeatHRef] = Config_MeatHChainModel
      • Set MeatHChainX[MeatHRef] = (X of MeatHNewPoint)
      • Set MeatHChainY[MeatHRef] = (Y of MeatHNewPoint)
      • Custom script: call RemoveLocation(udg_MeatHNewPoint)
      • Set MeatHDeg[MeatHRef] = Config_MeatHAngle
      • Set MeatHC[MeatHRef] = Temp_Unit
      • Set MeatHTraveled[MeatHRef] = 0.00
      • Set MeatHT[MeatHRef] = No unit
      • Custom script: set udg_MeatHRow[udg_MeatHRef] = CreateGroup()
      • Special Effect - Create a special effect attached to the orign of UDexUnits[MeatHRef] using Config_MeatHHeadModel
      • Set MeatHEffect[MeatHRef] = (Last created special effect)
      • Set MeatHChainScale[MeatHRef] = Config_MeatHChainScale
      • Set MeatHGrapple[MeatHRef] = Config_MeatHGrapple
      • Set MeatHRecicle[MeatHRef] = Config_MeatHRecicle
      • Set MeatHLockOn[MeatHRef] = Config_MeatHLockOn
      • Set MeatHIgnore[MeatHRef] = Config_MeatHIgnore
      • Set MeatHDestroyTrees[MeatHRef] = Config_MeatHDestroyTrees
      • Set MeatHDist[MeatHRef] = ((Config_MeatHDistance + ((Real(Config_MeatHlvl)) x Config_MeatHlvlDistnace)) - Config_MeatHStartOffset)
      • Set MeatHSpeed[MeatHRef] = (Config_MeatHSpeed + ((Real(Config_MeatHlvl)) x Config_MeatHlvlSpeed))
      • Set MeatHDamage[MeatHRef] = (Config_MeatHDamage + ((Real(Config_MeatHlvl)) x Config_MeatHlvlDamage))
      • Set MeatHDamageLoop[MeatHRef] = (Config_MeatHDamageLoop + ((Real(Config_MeatHlvl)) x Config_MeatHlvlDamageLoop))
      • Set MeatHDamageType[MeatHRef] = Config_MeatHDamageType
      • Set MeatHAoE[MeatHRef] = Config_MeatHAoE
      • Set MeatHDamageAoE[MeatHRef] = (Config_MeatHDamageAoE + ((Real(Config_MeatHlvl)) x Config_MeatHlvlDamageAoE))
      • Set MeatHAoEDamage[MeatHRef] = (Config_MeatHAoEDamage + ((Real(Config_MeatHlvl)) x Config_MeatHlvlAoEDamage))
      • Set MeatHAoESFX[MeatHRef] = Config_MeatHAoESFX
      • Set MeatHChainRate[MeatHRef] = Config_MeatHChainRate
      • Set MeatHSFX[MeatHRef] = Config_MeatHSFX
      • Set MeatHDamageLoop[MeatHRef] = ((Config_MeatHDamageLoop + ((Real(Config_MeatHlvl)) x MeatHlvlDamageLoop)) / 33.33)
      • Set MeatHAoE[MeatHRef] = (Config_MeatHAoE + ((Real(Config_MeatHlvl)) x Config_MeatHlvlAoE))
      • Set MeatHOffset[MeatHRef] = Config_MeatHOffset
      • Set MeatHFull[MeatHRef] = False
      • Set MeatHLaunch[MeatHRef] = True
      • Set MeatHSize[MeatHRef] = 1
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Unit Group - Add UDexUnits[MeatHRef] to MeatHRow[MeatHRef]
      • -------- > custom properties here < --------
      • -------- ----------------------- --------
      • Set MeatHLst[MeatHRef] = 1
      • Custom script: if udg_MeatHCount == 1 then
      • Custom script: call EnableTrigger( gg_trg_Meathook_loop )
      • Custom script: endif

  • Meathook loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in MeatHHeads and do (Actions)
        • Loop - Actions
          • Set MeatHHead = (Picked unit)
          • Set MeatHRef = (Custom value of MeatHHead)
          • Custom script: set udg_MeatHCX = GetUnitX(udg_MeatHC[udg_MeatHRef])
          • Custom script: set udg_MeatHCY = GetUnitY(udg_MeatHC[udg_MeatHRef])
          • -------- --------------------------------------------- --------
          • -------- Index row group into array --------
          • -------- --------------------------------------------- --------
          • Unit Group - Pick every unit in MeatHRow[MeatHRef] and do (Actions)
            • Loop - Actions
              • Set Temp_Int = (Custom value of (Picked unit))
              • -------- stores unit ID - used to access related data in other arrays --------
              • Set MeatHChainRef[MeatHLst[Temp_Int]] = Temp_Int
              • -------- stores unit in array for this spell instance --------
              • Set MeatHChain[MeatHLst[Temp_Int]] = UDexUnits[Temp_Int]
          • -------- --------------------------------------------- --------
          • -------- Move the chain --------
          • -------- --------------------------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MeatHLaunch[MeatHRef] Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MeatHLockOn[MeatHRef] Not equal to No unit
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MeatHC[MeatHRef] Equal to MeatHLockOn[MeatHRef]
                    • Then - Actions
                      • Set MeatHDeg[MeatHRef] = (Facing of MeatHC[MeatHRef])
                    • Else - Actions
                      • Custom script: set udg_tempX = GetUnitX(udg_MeatHLockOn[udg_MeatHRef])
                      • Custom script: set udg_tempY = GetUnitY(udg_MeatHLockOn[udg_MeatHRef])
                      • Custom script: set udg_MeatHDeg[udg_MeatHRef] = bj_RADTODEG * Atan2(udg_tempY - udg_MeatHChainY[udg_MeatHRef], udg_tempX - udg_MeatHChainX[udg_MeatHRef])
                • Else - Actions
              • Set tempX = (MeatHChainX[MeatHRef] + (MeatHSpeed[MeatHRef] x (Cos(MeatHDeg[MeatHRef]))))
              • Set tempY = (MeatHChainY[MeatHRef] + (MeatHSpeed[MeatHRef] x (Sin(MeatHDeg[MeatHRef]))))
              • -------- --------------------------------------------- --------
              • -------- If hook hit map boundary, return the hook. Else move it forward --------
              • -------- --------------------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Or - Any (Conditions) are true
                    • Conditions
                      • tempX Less than minX
                      • tempY Less than minY
                      • tempX Greater than maxX
                      • tempY Greater than maxY
                • Then - Actions
                  • Set UDex = MeatHRef
                  • Set MeatHEvent = 5.00
                  • Set MeatHEvent = 0.00
                  • Set MeatHLaunch[MeatHRef] = False
                • Else - Actions
                  • Custom script: call SetUnitX(udg_MeatHHead, udg_tempX)
                  • Custom script: call SetUnitY(udg_MeatHHead, udg_tempY)
                  • Set MeatHChainX[MeatHRef] = tempX
                  • Set MeatHChainY[MeatHRef] = tempY
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MeatHLaunch[MeatHRef] Equal to True
            • Then - Actions
              • -------- --------------------------------------------- --------
              • -------- If Launch = true, move the chain forward --------
              • -------- --------------------------------------------- --------
              • For each (Integer Temp_IntB) from 2 to MeatHSize[MeatHRef], do (Actions)
                • Loop - Actions
                  • -------- move chain towards head --------
                  • Set Temp_IntC = (Temp_IntB - 1)
                  • Custom script: set udg_Temp_Real = bj_RADTODEG * Atan2(udg_MeatHChainY[udg_MeatHChainRef[udg_Temp_IntB]] - udg_MeatHChainY[udg_MeatHChainRef[udg_Temp_IntC]], udg_MeatHChainX[udg_MeatHChainRef[udg_Temp_IntB]] - udg_MeatHChainX[udg_MeatHChainRef[udg_Temp_IntC]])
                  • Set MeatHChainX[MeatHChainRef[Temp_IntB]] = (MeatHChainX[MeatHChainRef[Temp_IntC]] + (MeatHChainRate[MeatHRef] x (Cos(Temp_Real))))
                  • Set MeatHChainY[MeatHChainRef[Temp_IntB]] = (MeatHChainY[MeatHChainRef[Temp_IntC]] + (MeatHChainRate[MeatHRef] x (Sin(Temp_Real))))
                  • Custom script: call SetUnitX(udg_MeatHChain[udg_Temp_IntB], udg_MeatHChainX[udg_MeatHChainRef[udg_Temp_IntB]])
                  • Custom script: call SetUnitY(udg_MeatHChain[udg_Temp_IntB], udg_MeatHChainY[udg_MeatHChainRef[udg_Temp_IntB]])
                  • Custom script: call SetUnitFacing(udg_MeatHChain[udg_Temp_IntB], udg_Temp_Real)
              • Set MeatHTraveled[MeatHRef] = (MeatHTraveled[MeatHRef] + MeatHSpeed[MeatHRef])
              • -------- Set Launce to fasle when the maximum distance is reached --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MeatHTraveled[MeatHRef] Greater than or equal to MeatHDist[MeatHRef]
                • Then - Actions
                  • Set UDex = MeatHRef
                  • Set MeatHEvent = 5.00
                  • Set MeatHEvent = 0.00
                  • Set MeatHLaunch[MeatHRef] = False
                • Else - Actions
            • Else - Actions
              • -------- --------------------------------------------- --------
              • -------- If Launch = false, check if grapple is true --------
              • -------- --------------------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MeatHGrapple[MeatHRef] Equal to True
                  • MeatHT[MeatHRef] Not equal to No unit
                • Then - Actions
                  • -------- --------------------------------------------- --------
                  • -------- If grapple is true and a target is in the hook... --------
                  • -------- --------------------------------------------- --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (MeatHT[MeatHRef] is alive) Equal to True
                    • Then - Actions
                      • -------- --------------------------------------------- --------
                      • -------- If target is alive, move grapple head to target --------
                      • -------- --------------------------------------------- --------
                      • Set MeatHNewPoint = (Position of MeatHT[MeatHRef])
                      • Set MeatHChainX[MeatHRef] = (X of MeatHNewPoint)
                      • Set MeatHChainY[MeatHRef] = (Y of MeatHNewPoint)
                      • Custom script: call RemoveLocation(udg_MeatHNewPoint)
                      • Custom script: call SetUnitX(udg_MeatHHead, udg_MeatHChainX[udg_MeatHRef])
                      • Custom script: call SetUnitY(udg_MeatHHead, udg_MeatHChainY[udg_MeatHRef])
                      • For each (Integer Temp_IntB) from 2 to MeatHSize[MeatHRef], do (Actions)
                        • Loop - Actions
                          • Custom script: set udg_Temp_Real = bj_RADTODEG * Atan2(udg_MeatHChainY[udg_MeatHChainRef[udg_Temp_IntB]] - udg_MeatHChainY[udg_MeatHChainRef[udg_Temp_IntB - 1]], udg_MeatHChainX[udg_MeatHChainRef[udg_Temp_IntB]] - udg_MeatHChainX[udg_MeatHChainRef[udg_Temp_IntB - 1]])
                          • Set MeatHChainX[MeatHChainRef[Temp_IntB]] = (MeatHChainX[MeatHChainRef[(Temp_IntB - 1)]] + (MeatHChainRate[MeatHRef] x (Cos(Temp_Real))))
                          • Set MeatHChainY[MeatHChainRef[Temp_IntB]] = (MeatHChainY[MeatHChainRef[(Temp_IntB - 1)]] + (MeatHChainRate[MeatHRef] x (Sin(Temp_Real))))
                          • Custom script: call SetUnitX(udg_MeatHChain[udg_Temp_IntB], udg_MeatHChainX[udg_MeatHChainRef[udg_Temp_IntB]])
                          • Custom script: call SetUnitY(udg_MeatHChain[udg_Temp_IntB], udg_MeatHChainY[udg_MeatHChainRef[udg_Temp_IntB]])
                          • Custom script: call SetUnitFacing(udg_MeatHChain[udg_Temp_IntB], udg_Temp_Real)
                    • Else - Actions
                      • Set MeatHT[MeatHRef] = No unit
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MeatHHooked[(Custom value of MeatHC[MeatHRef])] Equal to 0
                    • Then - Actions
                      • -------- --------------------------------------------- --------
                      • -------- If the caster is not hooked by someone else, move caster along the chain --------
                      • -------- --------------------------------------------- --------
                      • Custom script: set udg_Temp_Real = bj_RADTODEG * Atan2(udg_MeatHChainY[udg_MeatHChainRef[udg_MeatHSize[udg_MeatHRef]]] - udg_MeatHCY, udg_MeatHChainX[udg_MeatHChainRef[udg_MeatHSize[udg_MeatHRef]]] - udg_MeatHCX)
                      • Set MeatHCX = (MeatHCX + (MeatHSpeed[MeatHRef] x (Cos(Temp_Real))))
                      • Set MeatHCY = (MeatHCY + (MeatHSpeed[MeatHRef] x (Sin(Temp_Real))))
                      • Custom script: call SetUnitX(udg_MeatHC[udg_MeatHRef], udg_MeatHCX)
                      • Custom script: call SetUnitY(udg_MeatHC[udg_MeatHRef], udg_MeatHCY)
                    • Else - Actions
                • Else - Actions
                  • -------- --------------------------------------------- --------
                  • -------- If grapple is false, return the chain to the caster --------
                  • -------- --------------------------------------------- --------
                  • For each (Integer Temp_IntB) from 1 to (MeatHSize[MeatHRef] - 1), do (Actions)
                    • Loop - Actions
                      • -------- move chain, starting at the head --------
                      • Custom script: set udg_Temp_Real = bj_RADTODEG * Atan2(udg_MeatHChainY[udg_MeatHChainRef[udg_Temp_IntB + 1]] - udg_MeatHChainY[udg_MeatHChainRef[udg_Temp_IntB]], udg_MeatHChainX[udg_MeatHChainRef[udg_Temp_IntB + 1]] - udg_MeatHChainX[udg_MeatHChainRef[udg_Temp_IntB]])
                      • Set MeatHChainX[MeatHChainRef[Temp_IntB]] = (MeatHChainX[MeatHChainRef[Temp_IntB]] + (MeatHSpeed[MeatHRef] x (Cos(Temp_Real))))
                      • Set MeatHChainY[MeatHChainRef[Temp_IntB]] = (MeatHChainY[MeatHChainRef[Temp_IntB]] + (MeatHSpeed[MeatHRef] x (Sin(Temp_Real))))
                      • Custom script: call SetUnitX(udg_MeatHChain[udg_Temp_IntB], udg_MeatHChainX[udg_MeatHChainRef[udg_Temp_IntB]])
                      • Custom script: call SetUnitY(udg_MeatHChain[udg_Temp_IntB], udg_MeatHChainY[udg_MeatHChainRef[udg_Temp_IntB]])
                      • Custom script: call SetUnitFacing(udg_MeatHChain[udg_Temp_IntB], udg_Temp_Real)
                  • Custom script: set udg_Temp_Real = bj_RADTODEG * Atan2(udg_MeatHCY - udg_MeatHChainY[udg_MeatHChainRef[udg_MeatHSize[udg_MeatHRef]]], udg_MeatHCX - udg_MeatHChainX[udg_MeatHChainRef[udg_MeatHSize[udg_MeatHRef]]])
                  • Set MeatHChainX[MeatHChainRef[MeatHSize[MeatHRef]]] = (MeatHChainX[MeatHChainRef[MeatHSize[MeatHRef]]] + (MeatHSpeed[MeatHRef] x (Cos(Temp_Real))))
                  • Set MeatHChainY[MeatHChainRef[MeatHSize[MeatHRef]]] = (MeatHChainY[MeatHChainRef[MeatHSize[MeatHRef]]] + (MeatHSpeed[MeatHRef] x (Sin(Temp_Real))))
                  • Custom script: call SetUnitX(udg_MeatHChain[udg_MeatHSize[udg_MeatHRef]], udg_MeatHChainX[udg_MeatHChainRef[udg_MeatHSize[udg_MeatHRef]]])
                  • Custom script: call SetUnitY(udg_MeatHChain[udg_MeatHSize[udg_MeatHRef]], udg_MeatHChainY[udg_MeatHChainRef[udg_MeatHSize[udg_MeatHRef]]])
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MeatHT[MeatHRef] Not equal to No unit
                    • Then - Actions
                      • -------- --------------------------------------------- --------
                      • -------- Move target to the head --------
                      • -------- --------------------------------------------- --------
                      • Custom script: call SetUnitX(udg_MeatHT[udg_MeatHRef], udg_MeatHChainX[udg_MeatHRef])
                      • Custom script: call SetUnitY(udg_MeatHT[udg_MeatHRef], udg_MeatHChainY[udg_MeatHRef])
                    • Else - Actions
          • -------- --------------------------------------------- --------
          • -------- Add / Remove chains --------
          • -------- --------------------------------------------- --------
          • Custom script: set udg_Temp_Real = distance(udg_MeatHCX, udg_MeatHChainX[udg_MeatHChainRef[udg_MeatHSize[udg_MeatHRef]]], udg_MeatHCY, udg_MeatHChainY[udg_MeatHChainRef[udg_MeatHSize[udg_MeatHRef]]]) - udg_MeatHOffset[udg_MeatHRef]
          • If (MeatHLaunch[MeatHRef] Equal to False) then do (Set Temp_Real = (Temp_Real - MeatHSpeed[MeatHRef])) else do (-------- ... --------)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MeatHChainRate[MeatHRef] Greater than 0.00
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • Temp_Real Greater than MeatHChainRate[MeatHRef]
                • Then - Actions
                  • Custom script: loop
                  • Custom script: exitwhen udg_Temp_Real < udg_MeatHChainRate[udg_MeatHRef]
                  • Custom script: set udg_MeatHAngle = bj_RADTODEG * Atan2(udg_MeatHCY - udg_MeatHChainY[udg_MeatHChainRef[udg_MeatHSize[udg_MeatHRef]]], udg_MeatHCX - udg_MeatHChainX[udg_MeatHChainRef[udg_MeatHSize[udg_MeatHRef]]])
                  • Set MeatHTempX = (MeatHChainX[MeatHChainRef[MeatHSize[MeatHRef]]] + (MeatHChainRate[MeatHRef] x (Cos(MeatHAngle))))
                  • Set MeatHTempY = (MeatHChainY[MeatHChainRef[MeatHSize[MeatHRef]]] + (MeatHChainRate[MeatHRef] x (Sin(MeatHAngle))))
                  • Custom script: set udg_Temp_Int = GetUnitUserData(CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), udg_dummy, udg_MeatHTempX, udg_MeatHTempY, udg_MeatHAngle ))
                  • Unit - Pause UDexUnits[Temp_Int]
                  • Unit Group - Add UDexUnits[Temp_Int] to MeatHRow[MeatHRef]
                  • Set MeatHSize[MeatHRef] = (MeatHSize[MeatHRef] + 1)
                  • Set MeatHLst[Temp_Int] = MeatHSize[MeatHRef]
                  • Set MeatHChainRef[MeatHSize[MeatHRef]] = Temp_Int
                  • Set MeatHChainX[Temp_Int] = MeatHTempX
                  • Set MeatHChainY[Temp_Int] = MeatHTempY
                  • Animation - Change UDexUnits[Temp_Int]'s size to (MeatHChainScale[MeatHRef]%, MeatHChainScale[MeatHRef]%, MeatHChainScale[MeatHRef]%) of its original size
                  • Special Effect - Create a special effect attached to the orign of UDexUnits[Temp_Int] using MeatHChainModel[MeatHRef]
                  • Set MeatHEffect[Temp_Int] = (Last created special effect)
                  • Set MeatHChain[MeatHSize[MeatHRef]] = UDexUnits[Temp_Int]
                  • Set MeatHChainRate[MeatHRef] = (MeatHChainRate[MeatHRef] + 0.10)
                  • Set Temp_Real = (Temp_Real - MeatHChainRate[MeatHRef])
                  • Custom script: endloop
                • Else - Actions
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Real Less than (1.50 x MeatHSpeed[MeatHRef])
            • Then - Actions
              • Custom script: loop
              • Custom script: exitwhen udg_Temp_Real > udg_MeatHSpeed[udg_MeatHRef]
              • -------- --------------------------------------------- --------
              • -------- If only the head is left and is returning to the caster, end spell --------
              • -------- --------------------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MeatHSize[MeatHRef] Equal to 1
                  • MeatHLaunch[MeatHRef] Equal to False
                • Then - Actions
                  • Set UDex = MeatHRef
                  • Set MeatHEvent = 3.00
                  • Set MeatHEvent = 0.00
                  • Trigger - Run Meathook end <gen> (ignoring conditions)
                  • Set Temp_Real = (MeatHSpeed[MeatHRef] + 1.00)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MeatHSize[MeatHRef] Not equal to 1
                    • Then - Actions
                      • Special Effect - Destroy MeatHEffect[MeatHChainRef[MeatHSize[MeatHRef]]]
                      • Unit - Remove MeatHChain[MeatHSize[MeatHRef]] from the game
                      • Set MeatHSize[MeatHRef] = (MeatHSize[MeatHRef] - 1)
                      • Set Temp_Real = (Temp_Real + MeatHChainRate[MeatHRef])
                      • Set MeatHChainRate[MeatHRef] = (MeatHChainRate[MeatHRef] - 0.10)
                    • Else - Actions
              • Custom script: endloop
            • Else - Actions
          • Set UDex = MeatHRef
          • Set MeatHEvent = 1.00
          • Set MeatHEvent = 0.00
          • -------- --------------------------------------------- --------
          • -------- if spell still exists... --------
          • -------- --------------------------------------------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (MeatHHead is dead) Equal to False
            • Then - Actions
              • -------- --------------------------------------------- --------
              • -------- Search for a target to hook --------
              • -------- --------------------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MeatHFull[MeatHRef] Equal to False
                  • MeatHAoE[MeatHRef] Greater than 0.00
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • Config_MeatHIgnore Equal to True
                    • Then - Actions
                      • Custom script: call GroupEnumUnitsInRange(udg_Temp_Targets, udg_MeatHChainX[udg_MeatHRef], udg_MeatHChainY[udg_MeatHRef], udg_MeatHAoE[udg_MeatHRef], function FilterLockedUnit)
                    • Else - Actions
                      • Custom script: call GroupEnumUnitsInRange(udg_Temp_Targets, udg_MeatHChainX[udg_MeatHRef], udg_MeatHChainY[udg_MeatHRef], udg_MeatHAoE[udg_MeatHRef], null)
                  • Unit Group - Pick every unit in Temp_Targets and do (Actions)
                    • Loop - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • MeatHT[MeatHRef] Equal to No unit
                        • Then - Actions
                          • Set Temp_Unit = (Picked unit)
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • Temp_Unit Not equal to MeatHC[MeatHRef]
                              • (Temp_Unit is A flying unit) Equal to False
                              • (Temp_Unit is dead) Equal to False
                            • Then - Actions
                              • Set MeatHT[MeatHRef] = Temp_Unit
                              • Set UDex = MeatHRef
                              • Set MeatHEvent = 2.00
                              • Set MeatHEvent = 0.00
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • ((Owner of MeatHT[MeatHRef]) is an enemy of (Owner of MeatHC[MeatHRef])) Equal to True
                                • Then - Actions
                                  • Unit - Cause MeatHC[MeatHRef] to damage MeatHT[MeatHRef], dealing MeatHDamage[MeatHRef] damage of attack type MeatHDamageType[MeatHRef] and damage type Normal
                                • Else - Actions
                              • Set MeatHLaunch[MeatHRef] = False
                              • Set MeatHFull[MeatHRef] = True
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • MeatHGrapple[MeatHRef] Equal to False
                                • Then - Actions
                                  • Unit - Turn collision for MeatHT[MeatHRef] Off
                                  • Set MeatHT[MeatHHooked[(Custom value of MeatHT[MeatHRef])]] = No unit
                                  • Set MeatHHooked[(Custom value of MeatHT[MeatHRef])] = MeatHRef
                                  • Set MeatHLockOn[MeatHRef] = No unit
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • MeatHGrapling[(Custom value of MeatHC[MeatHRef])] Not equal to 0
                                    • Then - Actions
                                      • Set UDex = MeatHGrapling[(Custom value of MeatHC[MeatHRef])]
                                      • Trigger - Run Meathook end <gen> (ignoring conditions)
                                    • Else - Actions
                                  • Set MeatHGrapling[(Custom value of MeatHC[MeatHRef])] = MeatHRef
                                  • Unit - Turn collision for MeatHC[MeatHRef] Off
                            • Else - Actions
                        • Else - Actions
                  • Custom script: call GroupClear(udg_Temp_Targets)
                • Else - Actions
              • -------- --------------------------------------------- --------
              • -------- Deal damage --------
              • -------- --------------------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Owner of MeatHC[MeatHRef]) is an enemy of (Owner of MeatHT[MeatHRef])) Equal to True
                • Then - Actions
                  • Unit - Cause MeatHC[MeatHRef] to damage MeatHT[MeatHRef], dealing MeatHDamageLoop[MeatHRef] damage of attack type MeatHDamageType[MeatHRef] and damage type Normal
                  • Custom script: call DestroyEffect(AddSpecialEffectTarget( udg_MeatHSFX[udg_MeatHRef], udg_MeatHT[udg_MeatHRef], "chest" ))
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (MeatHT[MeatHRef] is dead) Equal to True
                    • Then - Actions
                      • Set UDex = MeatHRef
                      • Set MeatHEvent = 4.00
                      • Set MeatHEvent = 0.00
                      • Set MeatHT[MeatHRef] = No unit
                      • If (MeatHRecicle[MeatHRef] Equal to True) then do (Set MeatHFull[MeatHRef] = False) else do (-------- ... --------)
                    • Else - Actions
                • Else - Actions
              • -------- --------------------------------------------- --------
              • -------- Deal AoE damage --------
              • -------- --------------------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MeatHAoEDamage[MeatHRef] Greater than 0.00
                • Then - Actions
                  • Custom script: call GroupEnumUnitsInRange(udg_Temp_Targets, udg_MeatHChainX[udg_MeatHRef], udg_MeatHChainY[udg_MeatHRef], udg_MeatHDamageAoE[udg_MeatHRef], null)
                  • Unit Group - Pick every unit in Temp_Targets and do (Actions)
                    • Loop - Actions
                      • Set Temp_Unit = (Picked unit)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • Temp_Unit Not equal to MeatHC[MeatHRef]
                          • Temp_Unit Not equal to MeatHT[MeatHRef]
                          • (Temp_Unit is A flying unit) Equal to False
                          • ((Owner of Temp_Unit) is an enemy of (Owner of MeatHC[MeatHRef])) Equal to True
                        • Then - Actions
                          • Unit - Cause MeatHC[MeatHRef] to damage Temp_Unit, dealing MeatHAoEDamage[MeatHRef] damage of attack type MeatHDamageType[MeatHRef] and damage type Normal
                          • Custom script: call DestroyEffect(AddSpecialEffectTarget( udg_MeatHAoESFX[udg_MeatHRef], udg_Temp_Unit, "chest" ))
                        • Else - Actions
                • Else - Actions
              • -------- --------------------------------------------- --------
              • -------- Destroy destructables --------
              • -------- --------------------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MeatHDestroyTrees[MeatHRef] Equal to True
                • Then - Actions
                  • Set Temp_Rect = (Region((MeatHChainX[MeatHRef] - MeatHDamageAoE[MeatHRef]), (MeatHChainY[MeatHRef] - MeatHDamageAoE[MeatHRef]), (MeatHChainX[MeatHRef] + MeatHDamageAoE[MeatHRef]), (MeatHChainY[MeatHRef] + MeatHDamageAoE[MeatHRef])))
                  • Destructible - Pick every destructible in Temp_Rect and do (Actions)
                    • Loop - Actions
                      • Unit - Order harvester to Harvest (Picked destructible)
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Current order of harvester) Equal to (Order(harvest))
                        • Then - Actions
                          • Unit - Order harvester to Stop
                          • Destructible - Kill (Picked destructible)
                        • Else - Actions
                  • Custom script: call RemoveRect(udg_Temp_Rect)
                • Else - Actions
              • -------- --------------------------------------------- --------
              • -------- If Locked on target is dead, remove target --------
              • -------- --------------------------------------------- --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (MeatHLockOn[MeatHRef] is dead) Equal to True
                • Then - Actions
                  • Set MeatHLockOn[MeatHRef] = No unit
                • Else - Actions
            • Else - Actions

  • Meathook end
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (UDexUnits[UDex] is in MeatHHeads) Equal to True
        • Then - Actions
          • Unit - Turn collision for MeatHC[UDex] On
          • Unit - Turn collision for MeatHT[UDex] On
          • Set MeatHHooked[(Custom value of MeatHT[UDex])] = 0
          • Set MeatHGrapling[(Custom value of MeatHC[UDex])] = 0
          • Custom script: set udg_MeatHSpell[udg_UDex] = 0
          • Set MeatHT[UDex] = No unit
          • Set MeatHLockOn[UDex] = No unit
          • Set MeatHGrapple[UDex] = False
          • Set MeatHRecicle[UDex] = False
          • Set MeatHDestroyTrees[UDex] = False
          • Set MeatHOffset[UDex] = 0.00
          • Set MeatHChainScale[UDex] = 0.00
          • Set MeatHDist[UDex] = 0.00
          • Set MeatHTraveled[UDex] = 0.00
          • Set MeatHSpeed[UDex] = 0.00
          • Set MeatHDamage[UDex] = 0.00
          • Set MeatHDamageLoop[UDex] = 0.00
          • Set MeatHAoEDamage[UDex] = 0.00
          • Set MeatHAoE[UDex] = 0.00
          • Set MeatHChainRate[UDex] = 0.00
          • Custom script: set udg_MeatHDamageType[udg_UDex] = null
          • Custom script: set udg_MeatHChainModel[udg_UDex] = null
          • Set MeatHAngle = 0.00
          • Unit Group - Pick every unit in MeatHRow[UDex] and do (Actions)
            • Loop - Actions
              • Set Temp_Int = (Custom value of (Picked unit))
              • Special Effect - Destroy MeatHEffect[Temp_Int]
              • Unit - Kill UDexUnits[Temp_Int]
          • Unit Group - Remove UDexUnits[UDex] from MeatHHeads
          • Custom script: call DestroyGroup(udg_MeatHRow[udg_UDex])
          • Set MeatHCount = (MeatHCount - 1)
          • Custom script: if udg_MeatHCount == 0 then
          • Trigger - Turn off Meathook loop <gen>
          • Custom script: endif
        • Else - Actions
          • Game - Display to (All players) the text: (ERROR: Attempted to remove an invalid meathook with ID + (String(UDex)))



spells

Meat Hook

Launces a hook towards a target point or unit that grabs the first target it encounters, dealing 150/200/250/300 damage to enemies plus 75/100/125/150 DPS. The target will be dragged back to the Warden.
Range: 2250/2500/2750/3000
  • Meathook
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Meat Hook
    • Actions
      • Set Config_MeatHSpell = Meat Hook
      • Set Config_MeatHlvl = (Level of Meat Hook for (Triggering unit))
      • -------- set the angle --------
      • Set Temp_Point = (Position of (Triggering unit))
      • Set Temp_Point2 = (Target point of ability being cast)
      • Set Config_MeatHAngle = (Angle from Temp_Point to Temp_Point2)
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call RemoveLocation(udg_Temp_Point2)
      • -------- ------------- --------
      • -------- If Config_MeatHHook is false then this variables means nothing (you can't grapple something if your hook doesn't accepts a target) --------
      • Set Config_MeatHGrapple = False
      • -------- if the target die in a hook, can the same hook hook a new target? --------
      • Set Config_MeatHRecicle = True
      • Set Config_MeatHDestroyTrees = True
      • -------- Distance from meat hook's head to caster upon cast --------
      • Set Config_MeatHStartOffset = 128.00
      • -------- Distance between the caster and the chain's tale --------
      • Set Config_MeatHOffset = 64.00
      • -------- sets the unit type for the head and chain --------
      • Set Config_MeatHHeadModel = Abilities\Weapons\GlaiveMissile\GlaiveMissile.mdl
      • Set Config_MeatHChainModel = Abilities\Weapons\WardenMissile\WardenMissile.mdl
      • Set Config_MeatHHeadScale = 100.00
      • Set Config_MeatHChainScale = 200.00
      • Set Config_MeatHLockOn = (Target unit of ability being cast)
      • -------- If MeatHIgnore is true, only the lockon unit can be hooked --------
      • -------- In this trigger, I only set MeatHIgnore to true if there is a LockOn unit to hook --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Config_MeatHLockOn Equal to No unit
        • Then - Actions
          • Set Config_MeatHIgnore = False
        • Else - Actions
          • Set Config_MeatHIgnore = True
      • Set Config_MeatHDistance = 2000.00
      • Set Config_MeatHlvlDistnace = 250.00
      • Set Config_MeatHSpeed = 25.00
      • Set Config_MeatHlvlSpeed = 0.00
      • Set Config_MeatHDamage = 100.00
      • Set Config_MeatHlvlDamage = 50.00
      • -------- target dps --------
      • Set Config_MeatHDamageLoop = 50.00
      • Set Config_MeatHlvlDamageLoop = 25.00
      • -------- ------------- --------
      • -------- AoE dps --------
      • -------- range --------
      • Set Config_MeatHDamageAoE = 200.00
      • Set Config_MeatHlvlDamageAoE = 0.00
      • -------- amount --------
      • Set Config_MeatHAoEDamage = 5.00
      • Set Config_MeatHlvlAoEDamage = 0.00
      • -------- ------------- --------
      • Set Config_MeatHDamageType = Hero
      • Set Config_MeatHAoE = 100.00
      • Set Config_MeatHlvlAoE = 0.00
      • -------- avoid a chain rate lower than MeatHSpeed (include MeatHlvlSpeed) | 0 = no chain --------
      • Set Config_MeatHChainRate = 60.00
      • Set Config_MeatHSFX = Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
      • Set Config_MeatHAoESFX = Abilities\Weapons\HydraliskImpact\HydraliskImpact.mdl
      • Trigger - Run Meathook ini <gen> (ignoring conditions)
      • Game - Display to (All players) the text: (ID of last created spell is: + (String(MeatHRef)))


Grapple

Launces a hook towards a target point or unit that grabs the first target it encounters, dealing 325/400/475/550 damage and pulls the caster towards the target.
Range: 2250/2500/2750/3000
  • Grapple
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Grapple
    • Actions
      • Set Config_MeatHSpell = Grapple
      • Set Config_MeatHlvl = (Level of Meat Hook for (Triggering unit))
      • -------- set the angle --------
      • Set Temp_Point = (Position of (Triggering unit))
      • Set Temp_Point2 = (Target point of ability being cast)
      • Set Config_MeatHAngle = (Angle from Temp_Point to Temp_Point2)
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call RemoveLocation(udg_Temp_Point2)
      • -------- ------------- --------
      • -------- If Config_MeatHHook is false then this variables means nothing (you can't grapple something if your hook don't accepts a target) --------
      • Set Config_MeatHGrapple = True
      • -------- if the target die in a hook, can the same hook hook a new target? --------
      • Set Config_MeatHRecicle = True
      • Set Config_MeatHDestroyTrees = True
      • -------- Distance from meat hook's head to caster upon cast --------
      • Set Config_MeatHStartOffset = 128.00
      • -------- Distance between the caster and the chain's tale --------
      • Set Config_MeatHOffset = 64.00
      • -------- sets the unit type for the head and chain --------
      • Set Config_MeatHHeadModel = Abilities\Weapons\SentinelMissile\SentinelMissile.mdl
      • Set Config_MeatHChainModel = Abilities\Weapons\AncestralGuardianMissile\AncestralGuardianMissile.mdl
      • Set Config_MeatHHeadScale = 200.00
      • Set Config_MeatHChainScale = 100.00
      • Set Config_MeatHLockOn = No unit
      • Set Config_MeatHIgnore = False
      • Set Config_MeatHDistance = 2000.00
      • Set Config_MeatHlvlDistnace = 250.00
      • Set Config_MeatHSpeed = 30.00
      • Set Config_MeatHlvlSpeed = 0.00
      • Set Config_MeatHDamage = 250.00
      • Set Config_MeatHlvlDamage = 75.00
      • -------- target dps --------
      • Set Config_MeatHDamageLoop = 50.00
      • Set Config_MeatHlvlDamageLoop = 25.00
      • -------- ------------- --------
      • -------- AoE dps --------
      • -------- range --------
      • Set Config_MeatHDamageAoE = 0.00
      • Set Config_MeatHlvlDamageAoE = 0.00
      • -------- amount --------
      • Set Config_MeatHAoEDamage = 0.00
      • Set Config_MeatHlvlAoEDamage = 0.00
      • -------- ------------- --------
      • Set Config_MeatHDamageType = Hero
      • Set Config_MeatHAoE = 100.00
      • Set Config_MeatHlvlAoE = 0.00
      • -------- avoid a chain rate lower than MeatHSpeed (include MeatHlvlSpeed) | 0 = no chain --------
      • Set Config_MeatHChainRate = 45.00
      • Set Config_MeatHSFX = Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
      • Set Config_MeatHAoESFX = Abilities\Weapons\HydraliskImpact\HydraliskImpact.mdl
      • Trigger - Run Meathook ini <gen> (ignoring conditions)


Kamehameha

Blasts a powerful energy ball towards a target point, dealing 40/50/60/70 damage per second to nearby enemies.
Range: 2750/3000/3250/3500
  • Kamehameha
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Kamehameha
    • Actions
      • Set Config_MeatHSpell = Kamehameha
      • Set Config_MeatHlvl = (Level of Meat Hook for (Triggering unit))
      • -------- set the angle --------
      • Set Temp_Point = (Position of (Triggering unit))
      • Set Temp_Point2 = (Target point of ability being cast)
      • Set Config_MeatHAngle = (Angle from Temp_Point to Temp_Point2)
      • Custom script: call RemoveLocation(udg_Temp_Point)
      • Custom script: call RemoveLocation(udg_Temp_Point2)
      • -------- ------------- --------
      • -------- If Config_MeatHHook is false then this variables means nothing (you can't grapple something if your hook don't accepts a target) --------
      • Set Config_MeatHGrapple = False
      • -------- if the target die in a hook, can the same hook hook a new target? --------
      • Set Config_MeatHRecicle = True
      • Set Config_MeatHDestroyTrees = True
      • -------- Distance from meat hook's head to caster upon cast --------
      • Set Config_MeatHStartOffset = 32.00
      • -------- Distance between the caster and the chain's tale --------
      • Set Config_MeatHOffset = 32.00
      • -------- sets the unit type for the head and chain --------
      • Set Config_MeatHHeadModel = Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
      • Set Config_MeatHChainModel = Abilities\Weapons\SludgeMissile\SludgeMissile.mdl
      • Set Config_MeatHHeadScale = 250.00
      • Set Config_MeatHChainScale = 100.00
      • Set Config_MeatHLockOn = No unit
      • Set Config_MeatHIgnore = False
      • Set Config_MeatHDistance = 2500.00
      • Set Config_MeatHlvlDistnace = 250.00
      • Set Config_MeatHSpeed = 45.00
      • Set Config_MeatHlvlSpeed = 0.00
      • Set Config_MeatHDamage = 0.00
      • Set Config_MeatHlvlDamage = 0.00
      • -------- target dps --------
      • Set Config_MeatHDamageLoop = 0.00
      • Set Config_MeatHlvlDamageLoop = 0.00
      • -------- ------------- --------
      • -------- AoE dps --------
      • -------- range --------
      • Set Config_MeatHDamageAoE = 300.00
      • Set Config_MeatHlvlDamageAoE = 0.00
      • -------- amount --------
      • Set Config_MeatHAoEDamage = 30.00
      • Set Config_MeatHlvlAoEDamage = 10.00
      • -------- ------------- --------
      • Set Config_MeatHDamageType = Hero
      • Set Config_MeatHAoE = 0.00
      • Set Config_MeatHlvlAoE = 0.00
      • -------- avoid a chain rate lower than MeatHSpeed (include MeatHlvlSpeed) | 0 = no chain --------
      • Set Config_MeatHChainRate = 80.00
      • Set Config_MeatHSFX = Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
      • Set Config_MeatHAoESFX = Abilities\Spells\Other\Incinerate\IncinerateBuff.mdl
      • Trigger - Run Meathook ini <gen> (ignoring conditions)
      • Game - Display to (All players) the text: (ID of last created spell is: + (String(MeatHRef)))
      • Set Kamehameha[(Custom value of (Triggering unit))] = MeatHRef

  • Kamehameha end
    • Events
      • Unit - A unit Stops casting an ability
    • Conditions
      • (Ability being cast) Equal to Kamehameha
      • Kamehameha[(Custom value of (Triggering unit))] Not equal to 0
    • Actions
      • Set UDex = Kamehameha[(Custom value of (Triggering unit))]
      • Trigger - Run Meathook end <gen> (ignoring conditions)
      • Set Kamehameha[(Custom value of (Triggering unit))] = 0

  • on return
    • Events
      • Game - MeatHEvent becomes Equal to 5.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text: ((Name of MeatHC[UDex]) + 's hook has reached it's maximum distance)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MeatHSpell[UDex] Equal to Kamehameha
        • Then - Actions
          • Trigger - Run Meathook end <gen> (ignoring conditions)
          • Set Kamehameha[(Custom value of MeatHC[UDex])] = 0
        • Else - Actions


Tesla Coil

Releases 16 electrical bolts in all directions, dealing 6/8/10/12 damage per second to nearby enemies.
AoE: 800
  • Tesla Coil
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Tesla Coil
    • Actions
      • Set Config_MeatHSpell = Tesla Coil
      • Set Config_MeatHlvl = (Level of Meat Hook for (Triggering unit))
      • -------- If Config_MeatHHook is false then this variables means nothing (you can't grapple something if your hook don't accepts a target) --------
      • Set Config_MeatHGrapple = False
      • -------- if the target die in a hook, can the same hook hook a new target? --------
      • Set Config_MeatHRecicle = True
      • Set Config_MeatHDestroyTrees = False
      • -------- Distance from meat hook's head to caster upon cast --------
      • Set Config_MeatHStartOffset = 150.00
      • -------- Distance between the caster and the chain's tale --------
      • Set Config_MeatHOffset = 150.00
      • -------- sets the unit type for the head and chain --------
      • Set Config_MeatHHeadScale = 150.00
      • Set Config_MeatHChainScale = 200.00
      • Set Config_MeatHLockOn = No unit
      • Set Config_MeatHIgnore = False
      • Set Config_MeatHHeadModel = Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
      • Set Config_MeatHHeadModel = Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
      • Set Config_MeatHDistance = 800.00
      • Set Config_MeatHlvlDistnace = 0.00
      • Set Config_MeatHSpeed = 20.00
      • Set Config_MeatHlvlSpeed = 0.00
      • Set Config_MeatHDamage = 100.00
      • Set Config_MeatHlvlDamage = 50.00
      • -------- target dps --------
      • Set Config_MeatHDamageLoop = 50.00
      • Set Config_MeatHlvlDamageLoop = 25.00
      • -------- ------------- --------
      • -------- AoE dps --------
      • -------- range --------
      • Set Config_MeatHDamageAoE = 150.00
      • Set Config_MeatHlvlDamageAoE = 0.00
      • -------- amount --------
      • Set Config_MeatHAoEDamage = 4.00
      • Set Config_MeatHlvlAoEDamage = 2.00
      • -------- ------------- --------
      • Set Config_MeatHDamageType = Hero
      • Set Config_MeatHAoE = 0.00
      • Set Config_MeatHlvlAoE = 0.00
      • -------- avoid a chain rate lower than MeatHSpeed (include MeatHlvlSpeed) | 0 = no chain --------
      • Set Config_MeatHChainRate = 0.00
      • Set Config_MeatHSFX = Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
      • Set Config_MeatHAoESFX = Abilities\Spells\Items\AIlb\AIlbSpecialArt.mdl
      • -------- set the angle --------
      • Set Config_MeatHAngle = (Facing of (Triggering unit))
      • -------- ------------- --------
      • For each (Integer Temp_Int) from 1 to 16, do (Actions)
        • Loop - Actions
          • Set Config_MeatHAngle = (Config_MeatHAngle + 22.50)
          • Trigger - Run Meathook ini <gen> (ignoring conditions)






requires Bribe's (or similar) unit indexer

changelog

v4.2

fixed bug where damage per level is not applied correctly
added feature to hook only the targeted unit and ignores other targets

v4.1

pauses chain dummies
removed unnecessary GroupClear() function
removed unnecessary variable and it's code
adding chains using CreateUnit() native
hook no longer follows a dead "locked on" unit
"on return" event now also fires when hook reaches map bounds (Kamehameha bug fix)

v4

made chain offset configurable
removed some unnecessary code
added a spell property
improved the way chains are added and removed
a spell instance can now be removed on command
slightly improved performance
improved documentation
added +3 spell examples

v3.3

fixed the way targets are chosen
removed an unnecessary variable and it's code
made slight improvement on how the chain return

v3.2d

removed 2 leaks

v3.2c

Fixed as suggested by BPower
BPower



v3.2b

removed 4 region leaks (thanks BPower)
removed havester's location leak
made spell level configuratable

v3.2

greatly improved the method to create a new spell instance
tweaked conditions to improve performance
removed 2 unnecessary variables from the spell
spell is de-indexed more reliably
changed map boundary variables

v3.1

increased performance by over 50%
also increased multicast performance
made damage-type configurable
accidently fixed a bug where chain rate becomes uneven
adjust chain rate with number of chain instances to further increase performance
improved some test conditions
improved the way how chain instances are removed
removed a memory leak
chain can now destroy trees
improved comments

v3.0

grapple no longer removes target collusion
removed unnecessary variables and a spell
made changes as suggested by IcemanBo and Daffa the Mage
added 2 events
added instructions on how to add a custom property to the spell.

v2.1

renamed some variables
optimized custom scripts
fixed bug when unit in grapple dies

v2.0

added grapple
removed unnecessary actions
edited the chain's look
slightly improved performance

v1.1

changed AoE from 75 to 100
changed chain rate from 60 to 50
removed a memory leak
when a hooked unit is hooked again, it will be removed from the first hook
fixed a bug where curves slows the head down



lmao

Tell the doctors I have everything under control... except for the inventory systems :)

Modify it however you want. Please remember credits!

Keywords:
meat, hook, strike, grab, rope, chain, pudge, butcher, dota, grapple
Contents

[Spell] Meat Hook v4.2 (Map)

Reviews
Moderator
24th Mar 2016 Your resource has been reviewed by BPower. In case of any questions or for reconfirming the moderator's rating, please make use of the Quick Reply function of this thread. Review: Ever since DotA was released Meathook is one...
  1. 24th Mar 2016

    General Info

    Your resource has been reviewed by BPower.
    In case of any questions or for reconfirming the moderator's rating,
    please make use of the Quick Reply function of this thread.

    Review:

    Ever since DotA was released Meathook is one of the most popular custom spells in Warcraft III.
    As a consequence of its popularity, the spell has been coded multiple times on different modding homepages.
    I approve it based on the time you invested to re-create the concept. Good job!
    I tend to give you a rating of 3/5.
    • For concept(5) and uniqueness(1) ~3.
    • For API ~4
    • For coding ~3
    • For performance ~2
      Reason: Storing the all dummies per timeout into an array via ForGoup trigger execution requires a lot of extra computation.

    Troubleshooting:

      • Custom script: if IsPlayerAlly(GetOwningPlayer(udg_MeatHT[udg_MeatHRef]), GetOwningPlayer(udg_MeatHC[udg_MeatHRef])) == false then
      ^Rather use native IsPlayerEnemy.
    • Pausing dummies units improves performance.
    • Using ClearGroup is not required in your code.
    • There is a minimal chance for a group handle leak, but even if it occurs it will only happen once per game season.
     
  2. Maker

    Maker

    Joined:
    Mar 6, 2006
    Messages:
    9,193
    Resources:
    17
    Maps:
    2
    Spells:
    14
    Tutorials:
    1
    Resources:
    17
    I spotted a memory leak and unoptimized custom scripts. Unit group emtpy bj -> FirstOfGroup == null for example. Better to optimize the code a bit.
     
  3. ArgentinianUser

    ArgentinianUser

    Joined:
    Jun 23, 2010
    Messages:
    43
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I dont know to much about spells, but in my map it works fine, thanks!
     
  4. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,098
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Don' t hardcode. Create a config trigger where user can config the spell to his needs.
    Add descriptive comments for the user. This is especially needed in config part.

    I don't understand why you sometimes use custom scripts, if the GUI would do it, too. It's anyway a GUI spell.
    But anyway, if you use custom script then use the most efficient method. For example avoid BJs or also what Maker mentioned above.

    Don't name something like only "CValue" or "Temp_Real". It's okay for your test map,
    but consider the user also uses his own variables which might come in conflict with yours.
    So just make a standard and make for all your names for example "MHG_variableName".
     
  5. Daffa the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,531
    Resources:
    26
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    1
    Resources:
    26
    CountUnitsInGroup

    Don't use it, use a counter instead and increment it when unit casts and decrement it when an unit's effect is over
     
  6. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,098
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Additionaly to my previous post,

    - make as much configurable as possible. For example damaga/attack- type.
    - "Cur" or "Next" are not really descrptive names for variables of type "point"/"location".
    - These one liners in GUI for filters are very unreadable. Using "Multiple - Conditions" block is very recommended.
     
  7. SayazEmil

    SayazEmil

    Joined:
    Dec 3, 2014
    Messages:
    20
    Resources:
    0
    Resources:
    0
    It doesn't work on my map.
     
  8. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,098
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Well you can explain the submitter what's exactly your problem,
    maybe it will help him to fix the bug, if there is one.
    This resource is not approved yet.
     
  9. NightSkyAurora

    NightSkyAurora

    Joined:
    Mar 1, 2013
    Messages:
    529
    Resources:
    8
    Models:
    4
    Spells:
    4
    Resources:
    8
    Greetings hivers, I fixed the SetUnitX\Y problem. I will now try to eliminate the creation, accession and destruction of locations by storing and doing all calculations in X[] Y[] real variables and only send the results to SetUnitX\Y. I believe that this can boost performance to match the JASS version :D. This will now also fix the irritating behaviour in the map boundaries because SetUnitX\Y ignores them.
     
  10. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    7,824
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    http://www.hiveworkshop.com/forums/...?prev=search=meat%20hook&d=list&r=20&status=a

    http://www.hiveworkshop.com/forums/...?prev=search=meat%20hook&d=list&r=20&status=a

    http://www.hiveworkshop.com/forums/...?prev=search=meat%20hook&d=list&r=20&status=a

    http://www.hiveworkshop.com/forums/...?prev=search=meat%20hook&d=list&r=20&status=a

    Those are just some of the approved hooks. As a project to get this resource approved, please take some time to compare yours against the ones which have already been made so as to argue whether or not this one should get approved, too. Events are not enough.
     
  11. BPower

    BPower

    Joined:
    Mar 18, 2012
    Messages:
    1,745
    Resources:
    21
    Spells:
    15
    Tutorials:
    1
    JASS:
    5
    Resources:
    21
    I agree with Bribe. Did you compare your code to already existing Meat Hook spells?

    short review:

    1. Don't do this:
    • Custom script: call DestroyGroup(GetLastCreatedGroup())

    Instead store the group into a global group variable and use that one.
    There can be very special cases, where GetLastCreatedGroup() does not store the
    group you wish to destroy.

    Anyway, which group handle are you destroying here?

    2. Instead of two GameEvent variables ( reals ) you could use just one.
    HookEvent == 1, HookEvent == 2, HookEvent = 2.5, ....

    3. udg_MeatHCLoc leaks location handles periodically per hook head.
     
  12. NightSkyAurora

    NightSkyAurora

    Joined:
    Mar 1, 2013
    Messages:
    529
    Resources:
    8
    Models:
    4
    Spells:
    4
    Resources:
    8
    Thanks BPower, I'll change them right away.

    @Bribe:
    I know that there are many hook spells that are quite good. Some are simple like in dota and other more advanced like in Pudge Wars. My favourite Meat hook is the one by BPower (also happens to be one of the mods in this spell) but the only thing that offends me is the amount of resources and experience you need to be able to use his spell. I aim to create an efficient GUI and simple version of his spell that the general user can understand. I am also open for ideas to add more features to this spell... anything to get it approved :)
     
  13. BPower

    BPower

    Joined:
    Mar 18, 2012
    Messages:
    1,745
    Resources:
    21
    Spells:
    15
    Tutorials:
    1
    JASS:
    5
    Resources:
    21
    Current review:

    boundaryX/Y should be replaced by minX, minY, maxX, maxY.
    To get the correct boundary values GUI overs a function Min X Of Region, etc.

    In Trigger - initialization you are leaking a location handle.

    You do not reset you meat hook event variable real to 0 after the trigger fired.
    That's why the trigger can't fire again.

    In the grabble part exists a game message. Why so?
     
    Last edited: Nov 13, 2015
  14. ArmeniN

    ArmeniN

    Joined:
    Dec 29, 2015
    Messages:
    8
    Resources:
    0
    Resources:
    0
    Hello. how do i set this spell affect only heroes, since i want to make AI hook me trough non-hero units.
     
  15. NightSkyAurora

    NightSkyAurora

    Joined:
    Mar 1, 2013
    Messages:
    529
    Resources:
    8
    Models:
    4
    Spells:
    4
    Resources:
    8
    New update! :D I couldn't find any leaks though... I compared my spell to other meat hooks and find this one quite unique and fun. I know BPower's hook is really similar but this one is one of a kind in GUI. If there is ANY kind of changes or additions you'll like to see then PLEASE let me know!!! :cute:
     
  16. BPower

    BPower

    Joined:
    Mar 18, 2012
    Messages:
    1,745
    Resources:
    21
    Spells:
    15
    Tutorials:
    1
    JASS:
    5
    Resources:
    21
    You leak 4 rect handle when using (Entire map). That function returns a rect with map size.

    There is no configuration trigger added, where users can make level based settings.
     
  17. NightSkyAurora

    NightSkyAurora

    Joined:
    Mar 1, 2013
    Messages:
    529
    Resources:
    8
    Models:
    4
    Spells:
    4
    Resources:
    8
    What do you mean? These variables takes spell level into account...
    • Set Config_MeatHlvlDistnace = 250.00
    • Set Config_MeatHlvlDamage = 50.00
    • Set Config_MeatHlvlAoE = 0.00
    • ect...


    However I've found that I sat spell level to meathook level in the Launch_MH function so when one would use a different spell ID, meathook level would have been 0. I fixed that in the new update ^^
     
  18. BPower

    BPower

    Joined:
    Mar 18, 2012
    Messages:
    1,745
    Resources:
    21
    Spells:
    15
    Tutorials:
    1
    JASS:
    5
    Resources:
    21
    You move the chain members then you check for map boundaries.
    That's not logical.

    There is real onHook somewhere in the code. I guess it's from an older version.

    The event real is never reset to 0.00 Therefore two equal events can't fire in a row.
    This means that the event can't be fired for two different launching hooks.
     
  19. Skyflash

    Skyflash

    Joined:
    Mar 6, 2015
    Messages:
    129
    Resources:
    0
    Resources:
    0
    I`v Tested your map Well Done but i found some leaks by Using Handle Counter
    after 3 hooks the Handle Counter Showed me Approximately 1000 Leaks and thats not good
    Use this Method to find them
    • Leak Finder
      • Events
        • Time - Every 0.09 seconds of game time
      • Conditions
      • Actions
        • Set Debug = (Point(0.00, 0.00))
        • Custom script: call BJDebugMsg(I2S(GetHandleId(udg_Debug)-0x100000))
        • Custom script: call RemoveLocation(udg_Debug)