# Default/Code Get Object Type
Grammar — (Default Code Version) Return the object type for object object made by player player
Flags —Native
|Function
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 script version, except this version cannot be modified to handle custom requirements.
# Arguments
int
— Playerstring
— Object
Returns — int
native int AIDefaultGetObjectType(
int player,
string aliasType,
);
# 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
# mods/core.sc2mod
// L671
AIDefaultGetObjectType(player, objType)
// L708
AIDefaultGetObjectType(player, objType)