# Script Get Object Type

Grammar — (Script version) Return the object type for object object made by player player
FlagsFunction | CustomAI

Takes an Object ID and returns 0 if it is a unit, 1 if it is a building, 2 if it is an upgrade, and -1 if it does not fall into any of those categories. Same as the default/code version, except this version could potentially be modified to handle custom requirements.

# Arguments

  • int — Player
  • string — Object

Returns — int

Category: AI Advanced / Requirements / Functions

# Examples

— None found —