Object:GetObjectType¶
Read object type for this object.
object:GetObjectType()
Inputs: None beyond the Object receiver.
Output: Integer. 1 for a building, 2 for a unit, or 0.
Errors and unavailable states: A wrong receiver can raise a Lua argument error. No separate error result is returned; do not treat the documented fallback as a confirmed game value.
See Lua values and game objects for lifetime and enum guidance.