"GetLastCreatedUnit" in loop?

Komaqtion

You can change this now in User CP.
Reaction score
469
Hi!
I posted another thread about "GetLastCreatedUnit" before, but this one is about when it is used in a loop, so i thought i could make a new thread.

Anyway, I'm creating dummy units in a loop for effects that shall move and stuff, how should i use variables to not use the "GetLastCreatedUnit" since it is a BJ ???
 

DrEvil

FCRI Associate!
Reaction score
111


Is that what you were asking ?

In newgen you can just - ctrl + click on a bj and it will show what natives it calls :D

Hope i helped
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Yeah but that is still a bj, right?
Isn't there any other way of getting last created unit, since it is in a loop, i can't use locals to create the unit and set it at the same time.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> but that is still a bj

Sort of.
It's a global variable, that, in GUI, is returned by "Get last created unit"...
Same thing really as when you use a global variable yourself.
 

monoVertex

I'm back!
Reaction score
460
Yeah but that is still a bj, right?
Isn't there any other way of getting last created unit, since it is in a loop, i can't use locals to create the unit and set it at the same time.

Umm...

JASS:

local unit created

set created = CreateUnit(Player(0),'hpea',0,0,0)


The CreateUnit function returns a unit... that means you can directly assign it to a variable, without using last created unit and whatnot.
 
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