SetUnitPosition() VS SetUnitX() & SetUnitY()

grim001

New Member
Reaction score
10
SetUnitPosition checks for pathability at the location you move the unit to and is extremely slow, you should not use it.
 

SFilip

Gone but not forgotten
Reaction score
634
That actually mostly depends on what you need it for.
When using SetUnitX and SetUnitY the unit can move (well he can get ordered to do so, he probably wont get too far) unless you pause him.
And SetUnitPosition of course isn't so slow (not enough to worry about it unless it's an extreme case) and can be used just fine.
Simply put SetUnitX and SetUnitY is "forced", the unit will get to where you want it no matter what even if it's outside map bounds or on the place of some other unit. SetUnitPosition is "safe" when it comes to this, if you want a footman placed on the position of some grunt then he will appear next to it.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top