clearing the contents of a region variable

Inflicted

Currently inactive
Reaction score
63
the name says it all.

for example i have a Region Variable called "loc"
-and i set it to something for an ability
-after the ability i want to set it to nothing.

is there a method for this?
 

Inflicted

Currently inactive
Reaction score
63
ok in my example i said that i made a region variable called "loc".

now i set it to something because of a trigger that i made to do a custom spell.

but to prevent any form of leak i want to clear the variable.

-i dont know any custom script, thats why i am asking

i know theres a method for this, if anyone could mention it id greatly appreciate it
 

Inflicted

Currently inactive
Reaction score
63
oh ok thanx - that was what i was looking for

am i right in saying that the Region variable is called myRect?

but then why is it called RemoveRect? :? plz help explain
 

hunterrravyn

TH.net Regular
Reaction score
19
The rectangular things that you make in the editor are called Rects

point < rect < cells < regions
< = Made Up Of

actual regions are point that can make a shape of any kind, oh and as far as I know there is o gui support for them.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
oh ok thanx - that was what i was looking for

am i right in saying that the Region variable is called myRect?

but then why is it called RemoveRect? :? plz help explain

yes the rect variable is called myRect, the udg stands for user defined global, a prefix all variables used in GUI have when used in Jass.

Point and Rect variables are set and removed, special effect, floating text and group variables are destroyed:
call RemoveLocation
call RemoveRect
call DestroyGroup
call DestroyForce
call [...]
 

Inflicted

Currently inactive
Reaction score
63
sorry one more thing whats the method to remove a player variable?

i tried Custom Scipt: call RemovePlayer (udg_Upgrade_Player)

but it didnt work, plz help
 

Curo

Why am I still playing this game...?
Reaction score
109
I don't think players leak, so there is no need to remove them.
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Curo is right; Players are internally constants, and so they do not leak (and cannot be removed with making the player leave the game ;P).

However, in your rect/region scenario, you do not need to remove the rect. Pre-placed Regions/Rects do not leak, as they are reused. The only time RemoveRect is needed, is when you create a region/rect by converting points, or some similar method.
 
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