Cob Extensions - Unit weapons, attack info

Ext. ID Ext. Name Type Description Properties
21 WEAPON_AIM_ABORTED SET remove unit weapon target, forcing unit to find target again
Parameters: WeaponIndex (WEAPON_PRIMARY, WEAPON_SECONDARY or WEAPON_TERTIARY)
Recording
22 WEAPON_READY SET sets unit weapon reload time to 0, making it ready to be fired
Parameters: WeaponIndex (WEAPON_PRIMARY, WEAPON_SECONDARY or WEAPON_TERTIARY)
Recording
Weapons: Getter result or setter parameter is weapon ID
130 WEAPON_PRIMARY GET/SET primary weapon Recording (Set)
Network
131 WEAPON_SECONDARY GET/SET secondary weapon Recording (Set)
Network
132 WEAPON_TERTIARY GET/SET tertiary weapon Recording (Set)
Network
133 UNIT_KILLS GET unit kills counter
Parameters: UnitId - or none
-
134 ATTACKER_ID GET returns ID of attacker unit -
135 LOCKED_TARGET_ID GET returns ID of target unit locked by given weapon index
Parameters: WeaponIndex (WEAPON_PRIMARY, WEAPON_SECONDARY or WEAPON_TERTIARY)
-
136 UNDER_ATTACK GET returns byte value (0-255) which tells how badly unit is under fire -
137 FIRE_WEAPON GET force unit to fire its weapon against enemy unit with given ID or custom ground target (provide coordinates or unit id)
Parameters: WeaponIndex (WEAPON_PRIMARY, WEAPON_SECONDARY or WEAPON_TERTIARY), TargetUnitID, TargetPosition (packed X and Z)
RecordingNetwork
138 WEAPON_BUILD_PROGRESS GET get weapon build progress (0-100) or stockpile counter (built weapons)
Parameters:TRUE/FALSE
-

In order to operate on all three weapons of a single unit, it needs to have all weapons scripts running in COB, and weapons must be assigned before (it can be a NOWEAPON tag) in FBI file.