doArtilleryFire: Difference between revisions
Jump to navigation
Jump to search
m (Specified position as PositionAGL) |
Lou Montana (talk | contribs) m (Text replacement - "(\|[pr][0-9]+ *= *[^- ]*) *- *M([a-z ])" to "$1 - m$2") |
||
(14 intermediate revisions by 4 users not shown) | |||
Line 16: | Line 16: | ||
|p1= unit: [[Object]] | |p1= unit: [[Object]] | ||
|p2= position: [[PositionAGL]] | |p2= position: [[Array]] format [[Position#PositionAGL|PositionAGL]] | ||
|p3= type: [[String]] - | |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= < | |x1= <sqf>Mortar doArtilleryFire [[3000, 120, 1000], "8Rnd_82mm_Mo_shells", 3];</sqf> | ||
|seealso= [[commandArtilleryFire]] [[getArtilleryAmmo]] [[getArtilleryETA]] [[enableEngineArtillery]] [[getArtilleryComputerSettings]] [[shownArtilleryComputer]] [[inRangeOfArtillery]] [[fire]] [[doFire]] [[commandFire]] [[canFire]] [[fireAtTarget]] [[forceWeaponFire]] [[commandSuppressiveFire]] [[doSuppressiveFire]] [[isManualFire]] | |seealso= [[commandArtilleryFire]] [[getArtilleryAmmo]] [[getArtilleryETA]] [[enableEngineArtillery]] [[getArtilleryComputerSettings]] [[shownArtilleryComputer]] [[inRangeOfArtillery]] [[fire]] [[doFire]] [[commandFire]] [[canFire]] [[fireAtTarget]] [[forceWeaponFire]] [[commandSuppressiveFire]] [[doSuppressiveFire]] [[isManualFire]] | ||
}} | }} | ||
{{Note | |||
|user= ansin11 | |||
|timestamp= 20200418142600 | |||
|game= arma3 | |||
|version= 1.98 | |||
|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:''' | |||
<br>The Mk6 Mortar comes with four "8Rnd_82mm_Mo_shells" magazines, giving it a total of 32 HE shells. However, <sqf inline>_mortar doArtilleryFire [_somePos, "8Rnd_82mm_Mo_shells", 10];</sqf> will only fire 8 rounds instead of 10.<br><br> | |||
<br><br>'''Example:''' | Similarly, ... | ||
<br>The Mk6 Mortar comes with four "8Rnd_82mm_Mo_shells" magazines, giving it a total of 32 HE shells. However, | <sqf>_mortar doArtilleryFire [_somePos, "8Rnd_82mm_Mo_shells", 7]; // First burst | ||
sleep 20; // Wait until first burst has been fired | |||
<br><br>Similarly, ... | _mortar doArtilleryFire [_somePos, "8Rnd_82mm_Mo_shells", 2]; // Second burst</sqf> | ||
< | |||
_mortar | |||
... 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. | ||
}} | |||
</ | {{Note | ||
|user= Leopard20 | |||
|timestamp= 20220825210517 | |||
|text= After using this command, use [[unitReady]] to see if the unit is done firing all rounds: | |||
<sqf> | |||
_mortar doArtilleryFire [[3000, 120, 1000], "8Rnd_82mm_Mo_shells", 3]; | |||
waitUntil {sleep 1; unitReady _mortar}; // Note: make sure you run this in scheduled environment | |||
_mortar sideChat "Rounds fired!"; | |||
</sqf> | |||
}} |
Revision as of 15:39, 8 November 2023
Description
- Description:
- Orders an artillery unit to fire a burst on the given position (silently).
- Problems:
- The unit will fire a burst even if the rounds parameter is 0 or a negative number.
- Groups:
- Artillery
Syntax
- Syntax:
- unit doArtilleryFire [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 doArtilleryFire [[3000, 120, 1000], "8Rnd_82mm_Mo_shells", 3];
Additional Information
- See also:
- commandArtilleryFire 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
- Posted on Apr 18, 2020 - 14:26 (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 doArtilleryFire [_somePos, "8Rnd_82mm_Mo_shells", 10]; will only fire 8 rounds instead of 10.
Similarly, ...... 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._mortar doArtilleryFire [_somePos, "8Rnd_82mm_Mo_shells", 7]; // First burst sleep 20; // Wait until first burst has been fired _mortar doArtilleryFire [_somePos, "8Rnd_82mm_Mo_shells", 2]; // Second burst
- Posted on Aug 25, 2022 - 21:05 (UTC)
- After using this command, use unitReady to see if the unit is done firing all rounds: