Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:3.5

Description

Description:Returns the fuse behavior for a specific weapon (as set by setAmmoMode).

Syntax

Syntax:[unit, weapon] getAmmoMode [magazine, mode]
Parameters:
  • unit: Object - Unit whose weapon to check.
  • weapon: String - Classname of weapon to check.
  • magazine: String - Classname of magazine to check.
  • mode: String - The mode of the setting that is returned (V3.8.2+) (optional).
Return Value:Array - Either [mode, setting], if mode is not specified; or [setting], if mode is specified.

Alternative Syntax

Syntax:[vehicle, turret, weapon] getAmmoMode [magazine, mode]
Parameters:
  • vehicle: Object - Vehicle whose turret to check.
  • turret: Array - Path of turret to check.
  • weapon: String - Class name of weapon to check.
  • magazine: String - Class name of magazine to check.
  • mode: String - The mode of the setting that is returned (V3.8.2+) (optional).
Return Value:Array - Either [mode, setting], if mode is not specified; or [setting], if mode is specified.

Examples

Examples:
_fuse = [player,"vbs2_CarlGustavM3"] getAmmoMode ["vbs2_mag_CarlGustavM3_HEPF"]; // Might return ["distance",700]
_fuse = [vehicle player,[0],"vbs_boforsl70_cv90"] getAmmoMode ["vbs2_ammo_B_40mm_HEPF"]; // Might return ["timed",3.4]
_speed = [V01, [0], "vbs2_mortar_m252_81mm"] getAmmoMode ["vbs_mag_1rnd_Sh_81_HE_m821", "initSpeed"]; // Might return [141]

Additional Information

See also: setAmmoMode
Multiplayer: 
Problems: 

Notes