• 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.

Confused with location leaks

Status
Not open for further replies.
Level 9
Joined
Oct 17, 2007
Messages
547
When i put these types of condition does it leak those pocation points?
  • (All units of (Units owned by (Triggering player)) are in (Region centered at (Position of (Triggering unit)) with size (200.00, 200.00))) Equal to False
Just wondering cus I will be using a lot of those.
 
Level 8
Joined
Dec 29, 2006
Messages
359
im not at a comp with WC3 installed right now but ill try an use a makeshift trigger best i can.

Yes, i do believe that this will leak a location, to fix it, instead of putting that in conditions, use it as an if/then/else condition. Have an action before the if/then/else that sets a temppoint to the point you are using in the condition, then use custom script: call removelocation_udg_<your variable> and your set. Its been awhile since ive edited in wc3, but im pretty sure thats the correct code. If not, someone please correct me >.<
 
Level 9
Joined
Oct 17, 2007
Messages
547
Doesnt it also leak region?

Not sure - But maybe some pro will tell us.

No, i don't think so it will only leak a location point it doesn't leak the entire region.

BTW can anyone tell me why this is leaking?

  • Set TempLocPoint_To = ((Position of (Target unit of ability being cast)) offset by ((Random real number between -10000.00 and 10000.00), (Random real number between -10000.00 and 10000.00)))
  • Custom script: call RemoveLocation(udg_TempLocPoint_To)
EDIT: Nvm I figured out why it does, need to set "Location of (Target unit of ability being cast)" to another variable and destroy it.
 
Level 8
Joined
Dec 29, 2006
Messages
359
ok lets say you use the action create unit. The point where the unit is created will leak a location because the point where the unit was created was stored in a variable so it could be referenced to when creating the unit. After the unit is destroyed, the variable doesnt go anywhere, it just exists, and thus leaks data. These leaks need to be fixed because if enough of them pile up, it can cause lag. BTW, im pretty sure this would leak a unit group as well.
 
Status
Not open for further replies.
Top