Call RemoveReal(udg_? )

The newbie

New Member
Reaction score
0
I am not sure how to remove a "Real" variable, or integer and so on, could someone link, as there have got to be a list of custom script removes?

I searched on the forum and google, but couldn't seem to find it.

But does ***Call RemoveReal(udg_TempReal )*** work?
If it makes any difference the Real is Life/mana of trg unit
 

emilemil1

New Member
Reaction score
20
reals and integers gives such LOOOOOOOW memory loss. (i guess a one number integer takes as much space as a single letter)

You don't need a clean for it, ithey might not even leak at all.

Since the integer is not actually "on" the map, unlike variables like points that creates "a invisible dot" on the map itself that stays there forever unless removed.

Since the subject came up i want to ask a little quick Q:

If you assign a point variable to a location, do you have to destroy it by custom command or can you move the point around by using the Set Variable action over and over again. Or would it create a new "dot" and leak?
 

The newbie

New Member
Reaction score
0
So if I:

Set TempReal1 = Life of trgunit
Set TempReal2 = mana of trgunit

and I don't remove it. The second time I use it, it will just overwrite the old one right?
 

emilemil1

New Member
Reaction score
20
Perhaps, and if it doesn't, you still would have to run it atleast like 50 million times to feel any difference in the gameplay.
 

Kenny

Back for now.
Reaction score
202
Reals and integers are similar to primitive types, they do not extend handles, therefore dont need to be nulled/removed/destroyed/whatever.
 

Romek

Super Moderator
Reaction score
963
Only handles need to be cleaned, as they take up memory unless destroyed.

Locations are handles, so they need to be cleaned.
Reals are not, so they do not.
 

The newbie

New Member
Reaction score
0
If I:

Set TempUnit = trg unit

Can I somehow "remove/disable" trg unit from being TempUnit? Coz if I use TempUnit again in same (or other) spell, will that be a problem? (will it still think that TempUnit is the trg unit from my first spell, or will it forget that when I "set TempUnit = (new) trg unit"?)
 

Romek

Super Moderator
Reaction score
963
Units are killed and removed in-game, so they don't leak.
There are exceptions, such as dummy units never being destroyed.

There's no problem with using a global unit variable for all 'Temp Units'.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top