Setting a preplaced region into a variable vs Leak

XeRo13g

New Member
Reaction score
3
Somehow I got confused over this, I hope there is someone who can clear this up.

I have several preplaced regions that I need into an array variable. So, for this region named Town <gen> I used set Region(1) = Town <gen> at initialization.
(I'm not sure if that leaks, as far as I know leaks are produced by using an area/point and so on)

At some point I wanted to pick every unit in that region without a leak, so I've tried:
Set Temp_Region = Region(1)
pick all units in Temp_Region and do this and that
Custom script: call RemoveRect(udg_Temp_Region)

I did that in an effort to keep the Region (1) variable but as it seems, the custom script destroys both the Temp_Region and Region (1)

Is there any way I can deal with this?
 

Ryushi

"I will stand, or I will fall. I will not sit."
Reaction score
59
Preplaced Regions aren't going to leak. The leak would occur from the Unit Group, so you should set all the units in the region into a Unit Group Variable, and use DestroyGroup to remove it when you're done.
 

XeRo13g

New Member
Reaction score
3
Well, I do have the units in that region in a group that I remove it right after...
I got confused due to the fact that the preplaced region is set to a variable, thus trying to destroy it just to be safe. I guess I'll just use Region(1) without removing it...

Thanks alot +rep
Edit: as soon as it lets me:(
Eidt 2: Done
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top