BIS fnc fire: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ :\\\-\/|()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}")
m (Text replacement - "\|gr([0-9]+) = " to "|gr$1= ")
Line 5: Line 5:
|1.74
|1.74


|gr1 = Weapons
|gr1= Weapons


|gr2 = Object Manipulation
|gr2= Object Manipulation


|gr3 = Combat
|gr3= Combat


|arg= global|eff= global
|arg= global|eff= global

Revision as of 13:37, 11 April 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
call
Multiplayer:
The function is global, it is not to be used in unit fields.
Problems:
unit will not fire its weapon from FFV position. This is due to forceWeaponFire command ignoring units in FFV.
Groups:
WeaponsObject ManipulationCombat

Syntax

Syntax:
Syntax needed
Parameters:
entity: Object - unit or vehicle
muzzle: String - muzzle name of the muzzle to fire
turret (Optional): Array - turret path of the turret with given muzzle (vehicles only)
Return Value:
Return value needed

Examples

Example 1:
marshall = "B_APC_Wheeled_01_cannon_F" createVehicle position player; createVehicleCrew marshall; [marshall, "HE"] call BIS_fnc_fire; // fires HE muzzle of the main cannon [marshall, "AP"] call BIS_fnc_fire; // fires AP muzzle of the main cannon [marshall, "autocannon_40mm_CTWS"] call BIS_fnc_fire; // fires HE muzzle, because it is default [marshall, "LMG_M200_body"] call BIS_fnc_fire; // fires machine gun [marshall, "SmokeLauncher"] call BIS_fnc_fire; // fires smoke launcher [marshall, "TruckHorn"] call BIS_fnc_fire; // beeps the horn
Example 2:
[bob, "SmokeShellMuzzle"] call BIS_fnc_fire; // bob throws smoke grenade, if he has one [bob, "HandGrenadeMuzzle"] call BIS_fnc_fire; // bob throws hand grenade, if he has one
Example 3:
blackfoot = "B_Heli_Attack_01_dynamicLoadout_F" createVehicle position player; createVehicleCrew blackfoot; [blackfoot, "missiles_DAGR"] call BIS_fnc_fire; // fires missiles [blackfoot, "missiles_ASRAAM"] call BIS_fnc_fire; // fires missiles [blackfoot, "gatling_20mm"] call BIS_fnc_fire; // fires machine gun [blackfoot, "CMFlareLauncher"] call BIS_fnc_fire; // fires chaff
Example 4:
[vehicle mortargunner, "mortar_82mm"] call BIS_fnc_fire; // mortargunner fires mortar

Additional Information

See also:
firefireAtTargetforceWeaponFire

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note