# Script Get Object Type
Grammar — (Script version) Return the object type for object object made by player player
Flags —Function
|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
— Playerstring
— Object
Returns — int
# Related
Category: AI Advanced / Requirements / Functions
- [F] —
string
— Script Get Maker — ( ) - [F] —
int
— Script Get Object Type — ( ) - [F] —
string
— Script Get First Missing Req — ( ) - [F] —
string
— Script Get First Unfinished Req — ( ) - [F] —
int
— Script Get Full Make Time — ( ) - [F] —
string
— Default/Code Get Maker — ( AIDefaultGetMaker ) - [F] —
int
— Default/Code Get Object Type — ( AIDefaultGetObjectType ) - [F] —
string
— Default/Code Get First Missing Req — ( AIDefaultGetFirstMissingReq ) - [F] —
string
— Default/Code Get First Unfinished Req — ( AIDefaultGetFirstUnfinishedReq ) - [F] —
int
— Default/Code Get Full Make Time — ( AIDefaultGetFullMakeTime ) - [F] —
string
— Get Base Name — ( AIGetBaseName ) - [F] —
string
— Get BuildAt Name — ( AIGetBuildAtName )
# Examples
— None found —