• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Solved] Do they?

Status
Not open for further replies.
Level 6
Joined
Jun 1, 2014
Messages
165
Do these leak? And if so, how to fix it?
upload_2018-6-7_22-55-0.png upload_2018-6-7_22-56-55.png
 
Level 6
Joined
Jun 4, 2017
Messages
172
Yes these triggers leak.
The first trigger leaks 2 positions(Position of picked unit), to solve it just create a new point variable and set it at the position of picked unit, after that make your action(move picked unit....) and then remove the point(to remove a point create a custom script and write "call RemoveLocation(udg_Your_Point_Variable)"). There is also a group leak.
The second trigger leaks another point variable because you never remove it(the variable called "Angle").
Furthermore I don't think these triggers are completely MUI.
 
Level 6
Joined
Jun 1, 2014
Messages
165
I made these maybe 9 months ago. I don't even remember how i did it...
Edit:
Can someone just tell me how, like, exactly? So i can finally be done with this, and release a Beta and then go to bed.
 
Last edited:
Level 7
Joined
Dec 28, 2014
Messages
83
The following things that leak in your code are:
  • (Position of Caster) - a point/location
  • (Position of (Picked unit)) - a point/location
  • (Position of (Picked unit) offset by 16.00 towards (Angle from CasterPoint to Position of (Picked unit)) - a point/location
  • (Units within 290.00 of CasterPoint) - a unit group
The way to eliminate a point/location memory leak is to use:
  • Set CasterPoint = (Position of Caster)
  • Custom script: call RemoveLocation(udg_CasterPoint)
For a unit group:
  • Set Units = (Units within 290.00 of CasterPoint)
  • Custom script: call DestroyGroup(udg_Units)
The result would be something like this:

  • Knockback
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to War Stomp
    • Actions
      • Set Caster = (Triggering unit)
      • Set CasterPoint = (Position of Caster)
      • Set Units = (Units within 290.00 of CasterPoint)
      • Trigger - Turn on Knockback Update <gen>
      • Wait 0.24 game-time seconds
      • Trigger - Turn off Knockback Update <gen>
      • Custom script: call RemoveLocation(udg_CasterPoint)
  • Knockback Update
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Units and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of Caster)) Equal to True
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) is A structure) Equal to False
            • Then - Actions
              • Set KnockbackTargetPoint = (Position of (Picked unit))
              • Set KnockbackNewPoint = (KnockbackTargetPoint offset by 16.00 towards (Angle from CasterPoint to KnockbackTargetPoint) degrees)
              • Unit - Move (Picked unit) instantly to KnockbackNewPoint
              • Custom script: call RemoveLocation(udg_KnockbackTargetPoint)
              • Custom script: call RemoveLocation(udg_KnockbackNewPoint)
            • Else - Actions
      • Custom script: call DestroyGroup(udg_Units)
 
Level 6
Joined
Jun 1, 2014
Messages
165
I will give rep. to Glint later, when checked if the spell is working (and is leakless).
But now i need to know, what the heck is the problem here?
Edit:
From
Meat Hook System [GUI] v4.2
 

Attachments

  • upload_2018-6-8_15-51-19.png
    upload_2018-6-8_15-51-19.png
    1.1 MB · Views: 32
Last edited:
Level 13
Joined
May 10, 2009
Messages
868
Impossible to know with that screenshot. Please, post your trigger using these tags: [trigger]Your code here[/trigger]
if your trigger is huge, you can also hide it using [hidden][/hidden]


upload_2018-6-7_3-3-57.png


  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Melee Game - Use melee time of day (for all players)
      • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
      • Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
      • Melee Game - Set starting resources (for all players)
      • Melee Game - Remove creeps and critters from used start locations (for all players)
      • Melee Game - Create starting units (for all players)
      • Melee Game - Run melee AI scripts (for computer players)
      • Melee Game - Enforce victory/defeat conditions (for all players)
 
Level 6
Joined
Jun 1, 2014
Messages
165
It is at the Red Text!

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])
-------- --------------------------------------------- --------
Unit Group - Pick every unit in MeatHRow[MeatHRef] and do (Actions)
Loop - Actions
Set Temp_Int = (Custom value of (Picked unit))
Set MeatHChainRef[MeatHLst[Temp_Int]] = Temp_Int
Set MeatHChain[MeatHLst[Temp_Int]] = UDexUnits[Temp_Int]
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 (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
For each (Integer Temp_IntB) from 2 to MeatHSize[MeatHRef], do (Actions)
Loop - Actions
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])
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 (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 (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(MeatHT[MeatHRef] is alive) Equal to True
Then - Actions
-------- --------------------------------------------- --------
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
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
For each (Integer Temp_IntB) from 1 to (MeatHSize[MeatHRef] - 1), do (Actions)
Loop - Actions
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
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
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 (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 (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(MeatHHead is dead) Equal to False
Then - Actions
-------- --------------------------------------------- --------
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
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
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
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 (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

 
Last edited:
Level 13
Joined
May 10, 2009
Messages
868
I believe the problem lies on the custom script that is above the one you mentioned:
  • Custom script: call GroupEnumUnitsInRange(udg_Temp_Targets, udg_MeatHChainX[udg_MeatHRef], udg_MeatHChainY[udg_MeatHRef], udg_MeatHAoE[udg_MeatHRef], function FilterLockedUnit)
change it to
  • Custom script: call GroupEnumUnitsInRange(udg_Temp_Targets, udg_MeatHChainX[udg_MeatHRef], udg_MeatHChainY[udg_MeatHRef], udg_MeatHAoE[udg_MeatHRef], Filter(function FilterLockedUnit))
If the problem persists, then the custom function is not declared your map header - The map header has your map name, and the war3 map icon; It's above all triggers.
JASS:
//If MeatHLockOn != null and MeatHIgnore == true, this function is called to filter the locked unit
function FilterLockedUnit takes nothing returns boolean
   return ( GetFilterUnit() == udg_MeatHLockOn[udg_MeatHRef] )
endfunction
If it still persists, check if there's the "Temp_Targets" variable created as a Unit Group in your variable editor.

I don't really get why the spell maker used that function as a custom script in the first place. It turns his triggers into a mess and terrible for the others to import.
 
Level 6
Joined
Jun 1, 2014
Messages
165
It was your first guess. Thanks so much! So much!
Edit:
All solved now.
 
Last edited:
Status
Not open for further replies.
Top