• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Question About Leaks

Status
Not open for further replies.
Moin moin =)

That's a very good questions, because there are a difference... I don't know why but I notice this some time ago.
If you got for example the trigger:
  • Test
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Set TempLoc = (Center of (Playable map area))
      • Unit - Create 1 Footman for Player 1 (Red) at TempLoc facing Default building facing (270.0) degrees
      • Custom script: call RemoveLocation(udg_TempLoc)
then you have to remove the leak, else you got every 0.03 seconds a leak.

But, I can't give an example now, I notice it, that if I use this example above in a MUI trigger ( GUI in the loop trigger ) then the trigger doesn't work anymore correctly. ( Maybe other conditions ... )

So I don't know it exactly but actually you have to clear the leak in trigger you multiple use.

Greetings
~ The Bomb King > Dr. Boom
 
If you set a location variable to one point only, you only need to remove it once regardless of how many times you refer to that variable in your trigger. However, if you use it for more than one location, you'll need to remove it more than once.
Ex:
This is okay:
  • Set Temp_Loc = (Position of (Triggering unit))
  • Unit - Create 1 Footman for (Owner of (Triggering unit)) at Temp_Loc facing Default building facing degrees
  • Unit - Create 1 Archer for (Owner of (Triggering unit)) at Temp_Loc facing Default building facing degrees
  • Custom script: call RemoveLocation(udg_Temp_Loc)
Not this:
  • Set Temp_Loc = (Position of (Triggering unit))
  • Unit - Create 1 Footman for (Owner of (Triggering unit)) at Temp_Loc facing Default building facing degrees
  • Set Temp_Loc = (Position of (Target unit of ability being cast))
  • Unit - Create 1 Footman for (Owner of (Triggering unit)) at Temp_Loc facing Default building facing degrees
  • Custom script: call RemoveLocation(udg_Temp_Loc)
Do this:
  • Set Temp_Loc = (Position of (Triggering unit))
  • Unit - Create 1 Footman for (Owner of (Triggering unit)) at Temp_Loc facing Default building facing degrees
  • Custom script: call RemoveLocation(udg_Temp_Loc)
  • Set Temp_Loc = (Position of (Target unit of ability being cast))
  • Unit - Create 1 Footman for (Owner of (Triggering unit)) at Temp_Loc facing Default building facing degrees
  • Custom script: call RemoveLocation(udg_Temp_Loc)
 
Status
Not open for further replies.
Back
Top