commandArtilleryFire: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{cc\|([^} ]*)\}\}" to "// $1")
m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(7 intermediate revisions by the same user not shown)
Line 18: Line 18:
|p2= position: [[Array]] format [[Position#PositionAGL|PositionAGL]]
|p2= position: [[Array]] format [[Position#PositionAGL|PositionAGL]]


|p3= type: [[String]] - Magazine class name from [[Arma_3:_CfgMagazines|CfgMagazines]] (case sensitive).
|p3= type: [[String]] - magazine class name from [[Arma_3:_CfgMagazines|CfgMagazines]] (case sensitive).


|p4= rounds: [[Number]]
|p4= rounds: [[Number]]
Line 24: Line 24:
|r1= [[Nothing]]
|r1= [[Nothing]]


|x1= <code>Mortar commandArtilleryFire [<nowiki/>[3000, 120, 1000], "8Rnd_82mm_Mo_shells", 3];</code>
|x1= <sqf>Mortar commandArtilleryFire [[3000, 120, 1000], "8Rnd_82mm_Mo_shells", 3];</sqf>


|seealso= [[doArtilleryFire]] [[getArtilleryAmmo]] [[getArtilleryETA]] [[enableEngineArtillery]] [[getArtilleryComputerSettings]] [[shownArtilleryComputer]] [[inRangeOfArtillery]] [[fire]] [[doFire]] [[commandFire]] [[canFire]] [[fireAtTarget]] [[forceWeaponFire]] [[commandSuppressiveFire]] [[doSuppressiveFire]] [[isManualFire]]
|seealso= [[doArtilleryFire]] [[getArtilleryAmmo]] [[getArtilleryETA]] [[enableEngineArtillery]] [[getArtilleryComputerSettings]] [[shownArtilleryComputer]] [[inRangeOfArtillery]] [[fire]] [[doFire]] [[commandFire]] [[canFire]] [[fireAtTarget]] [[forceWeaponFire]] [[commandSuppressiveFire]] [[doSuppressiveFire]] [[isManualFire]]
Line 36: Line 36:
|text= This command can not fire bursts consisting of more rounds than the given magazine type holds, even if there are several magazines of the same type available. The fire mission issued by this command ends once the artillery unit has to reload.<br><br>
|text= This command can not fire bursts consisting of more rounds than the given magazine type holds, even if there are several magazines of the same type available. The fire mission issued by this command ends once the artillery unit has to reload.<br><br>
'''Example:'''
'''Example:'''
<br>The Mk6 Mortar comes with four "8Rnd_82mm_Mo_shells" magazines, giving it a total of 32 HE shells. However, {{ic|_mortar [[commandArtilleryFire]] [_somePos, "8Rnd_82mm_Mo_shells", 10];}} will only fire 8 rounds instead of 10.<br><br>
<br>The Mk6 Mortar comes with four "8Rnd_82mm_Mo_shells" magazines, giving it a total of 32 HE shells. However, <sqf inline>_mortar commandArtilleryFire [_somePos, "8Rnd_82mm_Mo_shells", 10];</sqf> will only fire 8 rounds instead of 10.<br><br>
Similarly, ...
Similarly, ...
<code>_mortar [[commandArtilleryFire]] [_somePos, "8Rnd_82mm_Mo_shells", 7]; // First burst
<sqf>
[[sleep]] 20; // Wait until first burst has been fired
_mortar commandArtilleryFire [_somePos, "8Rnd_82mm_Mo_shells", 7]; // First burst
_mortar [[commandArtilleryFire]] [_somePos, "8Rnd_82mm_Mo_shells", 2]; // Second burst</code>
sleep 20; // Wait until first burst has been fired
_mortar commandArtilleryFire [_somePos, "8Rnd_82mm_Mo_shells", 2]; // Second burst
</sqf>
... will only fire 8 rounds total instead of 9; the second round of the second burst is never fired because the artillery unit has to reload after the first round of the second burst.
... will only fire 8 rounds total instead of 9; the second round of the second burst is never fired because the artillery unit has to reload after the first round of the second burst.
}}
}}

Latest revision as of 19:42, 3 September 2024

Hover & click on the images for description

Description

Description:
Orders an artillery unit to fire a burst on the given position (via the radio).
Problems:
The unit will fire a burst even if the rounds parameter is 0 or a negative number.
Groups:
Artillery

Syntax

Syntax:
unit commandArtilleryFire [position, type, rounds]
Parameters:
unit: Object
position: Array format PositionAGL
type: String - magazine class name from CfgMagazines (case sensitive).
rounds: Number
Return Value:
Nothing

Examples

Example 1:
Mortar commandArtilleryFire [[3000, 120, 1000], "8Rnd_82mm_Mo_shells", 3];

Additional Information

See also:
doArtilleryFire getArtilleryAmmo getArtilleryETA enableEngineArtillery getArtilleryComputerSettings shownArtilleryComputer inRangeOfArtillery fire doFire commandFire canFire fireAtTarget forceWeaponFire commandSuppressiveFire doSuppressiveFire isManualFire

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
ansin11 - c
Posted on Apr 18, 2020 - 14:28 (UTC)

This command can not fire bursts consisting of more rounds than the given magazine type holds, even if there are several magazines of the same type available. The fire mission issued by this command ends once the artillery unit has to reload.

Example:
The Mk6 Mortar comes with four "8Rnd_82mm_Mo_shells" magazines, giving it a total of 32 HE shells. However, _mortar commandArtilleryFire [_somePos, "8Rnd_82mm_Mo_shells", 10]; will only fire 8 rounds instead of 10.

Similarly, ...

_mortar commandArtilleryFire [_somePos, "8Rnd_82mm_Mo_shells", 7]; // First burst sleep 20; // Wait until first burst has been fired _mortar commandArtilleryFire [_somePos, "8Rnd_82mm_Mo_shells", 2]; // Second burst
... will only fire 8 rounds total instead of 9; the second round of the second burst is never fired because the artillery unit has to reload after the first round of the second burst.