Cob Extensions - Creating and killing units

Ext. ID Ext. Name Type Description Properties
150 GIVE_UNIT GET give unit to other player
Parameters: UnitID, NewOwnerPlayerID
-
151 CREATE_UNIT GET rapidly spawn a unit (this is not a build queue order). Y position will get fixed - based on ground level at XZ coords. Set UnitMoveState to 6 for air units to spawn them at air level. Pass OwnerIndex 10 to set the same as caller unit owner for created unit. Returns unit ID if succeeded
Parameters: UnitTypeCrc, PackedXZ, OwnerIndex, UnitMoveState
Recording
152 KILL_THIS_UNIT SET kill this unit
Parameters: DestroyMethod :
0 - dgun
1 - explode as
2 - self destruct
3 - no blast
4 - self destruct countdown
Recording
153 KILL_OTHER_UNIT GET kill unit
Parameters: UnitID, DestroyMethod
Recording
154 CREATE_MINIONS GET spawn minions around caller unit
Parameters: UnitTypeCrc, AmountOfUnits, OrderToGive, ArrayID
ArrayID = 0 if you want to avoid creating array of minions units IDs
ArrayID = 65535 and AmountOfUnits = 1, to spawn a single unit and get ID of it as a result of getter
ArrayID = get RANDOM_ARRAY_ID(2), and AmountOfUnits > 1, to create array that contains spawned minions units IDs. Getter will result in amount of successfully spawned units.
Recording
155 SWAP_UNIT_TYPE SET kill unit without any blast and spawn new unit of different type (given in parameter) at its location
Parameter: UnitTypeCrc
Network

SWAP_UNIT_TYPE

set SWAP_UNIT_TYPE to ARMBRTHA;

swaptyp1 swatyp2