addWeaponCargo

From BISim Wiki
Jump to: navigation, search


Introduced in vbs2 version 1.00

Arguments don't have to be local to the executing client.Effects are not broadcasted over the network, and remain local to the executing client.

Hover over or click the images for descriptions.

Introduced in

Version:1.00

Description

Description: Add weapons to the cargo space of vehicles, which can be taken out by infantry units. Once the weapon cargo space is filled up, any further addWeaponCargo commands are ignored.

Syntax

Syntax: vehicle addWeaponCargo [weaponName, count, createObject]
Parameters:
  • vehicle: Object - Vehicle to add the weapons to.
  • weaponName: String - Weapon class name. See the topic CfgWeapons for reference about possible values.
  • count: Number - Number of weapons to add.
  • createObject: Boolean - If true, creates an object reference while creating the weapon in cargo (optional, default: false). (V3.9+)
Return Value: Nothing

Alternative Syntax

Syntax:unit addWeaponCargo [weaponName, count, createObject] (V3.9+)
Parameters:
  • unit: Object - Unit to add the weapons to.
  • weaponName: String - Weapon class name.
  • count: Number - Number of weapons to add.
  • createObject: Boolean - If true, creates an object reference while creating the weapon in cargo (optional, default: false).
Return Value:Array - Array containing objects referencing new weapons.

Alternative Syntax #2

Syntax:unit addWeaponCargo [weapon, count, createObject] (V3.9+)
Parameters:
  • unit: Object - Unit to add the weapons to.
  • weapon: Object - Weapon object.
  • count: Number - Number of weapons to add.
  • createObject: Boolean - No effect (optional, default: false).
Return Value:Array - Array containing objects referencing new weapons.

Examples

Examples:
_truck addWeaponCargo ["M16",5]
_weapons = crate addWeaponCargo [“vbs_ucs_colt_m4a1”,2,true]

Additional Information

See also: addMagazineCargo, addWeaponCargoGlobal, clearMagazineCargo
Multiplayer: 
Problems: 

Notes

Only post proven facts here. Use the talk page or the forums for discussions.



Notes


Bottom Section

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox