{"name":"doArtilleryFire","operator":null,"title":"doArtilleryFire","type":"command","url":"https://community.bistudio.com/wiki/doArtilleryFire","revid":377401,"updated":"2026-01-02T06:44:56Z","groups":["Artillery"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma3","name":"Arma 3","version":"0.50"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":null,"server_exec":false},"exec":null,"description":"Orders an artillery unit to fire a burst on the given position (silently).","syntaxes":[{"syntax":"unit doArtilleryFire [position, type, rounds]","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"},{"name":"position","type":"PositionAGL","optional":false,"default":null,"description":null,"types":["PositionAGL"],"since":null,"text":"position: PositionAGL"},{"name":"type","type":"String","optional":false,"default":null,"description":"magazine class name from CfgMagazines (case sensitive).","types":["String"],"since":null,"text":"type: String - magazine class name from CfgMagazines (case sensitive)."},{"name":"rounds","type":"Number","optional":false,"default":null,"description":null,"types":["Number"],"since":null,"text":"rounds: Number"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"unit","types":["Object"]},"right":{"text":"[position, type, rounds]","types":["Array"]}}],"examples":[{"text":"```sqf\nMortar doArtilleryFire [[3000, 120, 1000], \"8Rnd_82mm_Mo_shells\", 3];\n```","code":["Mortar doArtilleryFire [[3000, 120, 1000], \"8Rnd_82mm_Mo_shells\", 3];"]}],"multiplayer":null,"problems":"The unit will fire a burst even if the **rounds** parameter is 0 or a negative number.","aliases":[],"see_also":["commandArtilleryFire","getArtilleryAmmo","getArtilleryETA","enableEngineArtillery","getArtilleryComputerSettings","shownArtilleryComputer","inRangeOfArtillery","fire","doFire","commandFire","canFire","fireAtTarget","forceWeaponFire","commandSuppressiveFire","doSuppressiveFire","isManualFire"],"notes":[{"user":"ansin11","date":"2020-04-18T14:26:00Z","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.\n\n**Example:**\n\nThe 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.\n\nSimilarly, ...\n\n```sqf\n_mortar doArtilleryFire [_somePos, \"8Rnd_82mm_Mo_shells\", 7]; // First burst\nsleep 20; // Wait until first burst has been fired\n_mortar doArtilleryFire [_somePos, \"8Rnd_82mm_Mo_shells\", 2]; // Second burst\n```\n\n... 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."},{"user":"Leopard20","date":"2022-08-25T21:05:17Z","text":"After using this command, use unitReady to see if the unit is done firing all rounds:\n\n```sqf\n_mortar doArtilleryFire [[3000, 120, 1000], \"8Rnd_82mm_Mo_shells\", 3];\nwaitUntil {sleep 1; unitReady _mortar}; // Note: make sure you run this in scheduled environment\n_mortar sideChat \"Rounds fired!\";\n```"}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Artillery","Introduced with Arma 3 version 0.50","Scripting Commands"]}