Variable 'unit (type)'

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
It's like the difference between a car model and a specific car. A unit type is like ferrari for example while a unit can be your car. That's why, when you create units, it asks you for a unit type. If you wanted to create a car, you would have to tell the manufacturer what car model you want.

A unit type is the stuff that exists in the data editor. A unit is a unit that is on the map and playing. It might have lost some health, it has a position and rotation etc.
 

MissKerrigan

Active Member
Reaction score
23
mmm I think I will understand that after reading a few times :)

anyway, for example:

If my trigger creates a firebat after 5 game minutes and I want to store this in a variable do I need a variable of the type 'unit' then?

It seems yes, but why i cannot create 1 'firebat' in a certain region?
 

Dave312

Censored for your safe viewing
Reaction score
269
The Unit variable stores a specific unit that is in the game, so it can store your firebat as an example.

The Unit Type variable refers to a generic unit type, say a marine or firebat. It is not a particular unit in the game but rather a type of unit.

So when you create a unit, you need to specify the type of unit you want created, so it takes the a Unit Type . The action then creates a specific unit which you reference with Unit variable
 
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