Cob Extensions - Unit ID, owner, type

Ext. ID Ext. Name Type Description
69 MIN_ID GET returns the lowest valid unit ID number
70 MAX_ID GET returns the highest valid unit ID number
71 MY_ID GET returns ID of caller unit
72 UNIT_TEAM GET returns owner player ID of unit given with parameter
Parameters: UnitId
73 UNIT_BUILD_PERCENT_LEFT GET basically BUILD_PERCENT_LEFT, but comes with a unit parameter
74 UNIT_ALLIED GET is unit given with parameter allied to the caller unit. 1=allied, 0=not allied
Parameters: UnitId
75 UNIT_IS_ON_THIS_COMP GET indicates if unit is local to this computer
Parameters: UnitId
76 UNIT_ALLIED_WITH_LOCAL GET is owner of extension caller unit allied to local player
77 UNIT_TYPE_CRC GET/SET returns or sets (caller or with given parameter) unit type. Warning: Setter doesn't affect COB, model (locally), weapons etc. of the unit, but properties like max health, generated resources, name. I do not recommend using setter for serious changes (switching between Commander and Fusion Reactor, and things like that). Although it's a perfect solution if you want to change your unit max health, by switching its type to a dummy clone with modified values
GET Parameters: UnitId - or none
SET Parameter: UnitTypeCrc
78 UNIT_TYPE_CRC_TO_ID GET convert unit type CRC to unit type ID that can be used with orders create extension
79 UNIT_TYPE_ID_TO_CRC GET convert unit type ID to unit type CRC
80 UNIT_TYPE_IN_CATEGORY GET

Check is given unit type in "no chase" or "bad target" category of caller unit.
Parameters: CategoryType, UnitTypeCRC
as defined in exptype.h:
0 - ucsNoChase
1 - ucsPriBadTarget
2 - ucsSecBadTarget
3 - ucsTerBadTarget

81 PRIOR_UNIT GET returns ID of prior unit. f.e. when unit gets built in lab it will try to park, this extension will return then ID of plant. It is also being used by units that are attached to multi transporters to determine other loaded in transporter units (because transporter store only ID of last loaded unit)
82 TRANSPORTED_BY GET mobile units : returns unit ID of transporter (unit that transports this unit)
or ID of builder (plant) that is constructor of caller unit
83 TRANSPORTING GET transporters : returns transported unit ID (last loaded)
plants : returns ID of unit being currently build

Transporter - Get IDs of all transported units

transported_unit = get TRANSPORTING(get MY_ID);
while (transported_unit)
{
    // this is a pseudo recursive call loop so use it wisely    
    // do anything you want with the ID (transported_unit) right
    // ... HERE ...
    transported_unit = get PRIOR_UNIT(transported_unit);
}