doArtilleryFire: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[[Cc]ategory:[ _]?Arma[ _]3:[ _]([^|]*)[ _]?\|.*\]\]" to "{{GameCategory|arma3|$1}}")
m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>")
 
(37 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 0.50


|0.50|Game version=
|arg= local


|gr1= Artillery |GROUP1=
|gr1= Artillery
____________________________________________________________________________________________
| Orders a unit to reload defined magazine commence fire burst on the given position (silently).  |DESCRIPTION=
____________________________________________________________________________________________


| unit '''doArtilleryFire''' [position, type, rounds] |SYNTAX=
|descr= Orders an artillery unit to fire a burst on the given position (silently).


|p1= unit: [[Object]]  |PARAMETER1=
|pr= The unit will fire a burst even if the '''rounds''' parameter is 0 or a negative number.


|p2= position: [[Position]] |PARAMETER2=
|s1= unit [[doArtilleryFire]] [position, type, rounds]


|p3= type: [[String]] - Ammunition class name ('''case sensitive''') |PARAMETER3=
|p1= unit: [[Object]]


|p4= rounds: [[Number]] |PARAMETER4=
|p2= position: [[Array]] format [[Position#PositionAGL|PositionAGL]]


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


|p4= rounds: [[Number]]


|x1= <code>mortar1 [[doArtilleryFire]] [<nowiki/>[3000, 120, 1000], "8Rnd_82mm_Mo_shells", 3];</code> |EXAMPLE1=
|r1= [[Nothing]]


____________________________________________________________________________________________
|x1= <sqf>Mortar doArtilleryFire [[3000, 120, 1000], "8Rnd_82mm_Mo_shells", 3];</sqf>


| [[getArtilleryAmmo]], [[getArtilleryETA]], [[enableEngineArtillery]], [[getArtilleryComputerSettings]], [[shownArtilleryComputer]], [[inRangeOfArtillery]], [[fire]], [[doFire]], [[commandFire]], [[canFire]], [[fireAtTarget]], [[forceWeaponFire]], [[commandArtilleryFire]], [[commandSuppressiveFire]], [[doSuppressiveFire]], [[isManualFire]] |SEEALSO=
|seealso= [[commandArtilleryFire]] [[getArtilleryAmmo]] [[getArtilleryETA]] [[enableEngineArtillery]] [[getArtilleryComputerSettings]] [[shownArtilleryComputer]] [[inRangeOfArtillery]] [[fire]] [[doFire]] [[commandFire]] [[canFire]] [[fireAtTarget]] [[forceWeaponFire]] [[commandSuppressiveFire]] [[doSuppressiveFire]] [[isManualFire]]
}}


| |MPBEHAVIOUR=  
{{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>
Similarly, ...
<sqf>
_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
</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.
}}
}}


<h3 style='display:none'>Notes</h3>
{{Note
<dl class='command_description'>
|user= Leopard20
<!-- Note Section BEGIN -->
|timestamp= 20220825210517
 
|text= After using this command, use [[unitReady]] to see if the unit is done firing all rounds:
<!-- Note Section END -->
<sqf>
</dl>
_mortar doArtilleryFire [[3000, 120, 1000], "8Rnd_82mm_Mo_shells", 3];
 
waitUntil {sleep 1; unitReady _mortar}; // Note: make sure you run this in scheduled environment
<h3 style='display:none'>Bottom Section</h3>
_mortar sideChat "Rounds fired!";
{{GameCategory|arma3|New_Scripting_Commands_List}}
</sqf>
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
<!-- CONTINUE Notes -->
<dl class="command_description">
<dd class="notedate">Posted on April 18, 2020 - 14:26 (UTC)</dd>
<dt class="note">[[User:ansin11|ansin11]]</dt>
<dd class="note">
'''Arma 3 (1.98.146303):''' 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, <code>_mortar [[doArtilleryFire]] [_somePos, "8Rnd_82mm_Mo_shells", 10];</code> will only fire 8 rounds instead of 10.
 
<br/><br/>Similarly, <code>_mortar [[doArtilleryFire]] [_somePos, "8Rnd_82mm_Mo_shells", 7]; //First burst<br/><br/>[[sleep]] 20; //Wait until first burst has been fired<br/><br/>_mortar [[doArtilleryFire]] [_somePos, "8Rnd_82mm_Mo_shells", 2]; //Second burst</code> 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.
</dd>
</dl>
<!-- DISCONTINUE Notes -->

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 (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
ansin11 - c
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, ...

_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
... 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.

Leopard20 - c
Posted on Aug 25, 2022 - 21:05 (UTC)
After using this command, use unitReady to see if the unit is done firing all rounds:
_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!";