{"name":"doFire","operator":null,"title":"doFire","type":"command","url":"https://community.bistudio.com/wiki/doFire","revid":378648,"updated":"2026-05-17T15:10:41Z","groups":["Unit Control"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"local","effect":"global","server_exec":false},"exec":null,"description":"Order the given unit(s) to fire on the given target (without radio messages).\n\nThe target is set with doTarget or commandTarget.\n\nThe target can be a unit or a vehicle, but not an object.","syntaxes":[{"syntax":"unit doFire target","since":null,"effect":null,"exec":null,"params":[{"name":"unit","type":"Object or Array of Objects","optional":false,"default":null,"description":null,"types":["Object","Array"],"since":null,"text":"unit: Object or Array of Objects"},{"name":"target","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"target: Object"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"unit","types":["Object","Array"]},"right":{"text":"target","types":["Object"]}}],"examples":[{"text":"```sqf\n_ESoldier1 doFire _WSoldier1;\n```","code":["_ESoldier1 doFire _WSoldier1;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["fire","commandFire","canFire","fireAtTarget","forceWeaponFire","commandArtilleryFire","commandSuppressiveFire","doArtilleryFire","doSuppressiveFire","isManualFire"],"notes":[{"user":"Hardrock","date":"2006-08-03T14:31:00Z","text":"*Notes from before the conversion:*\n\nIt is often helpful to use doTarget first."},{"user":"Hurricane","date":"2007-03-25T23:17:00Z","text":"A unit will not execute this command when his behaviour is set to \"careless\"."},{"user":"Sakura_chan","date":"2012-06-07T14:05:00Z","text":"`unitName doFire objNull` does not work like it does in `commandFire`.\nTarget var has to be real (Arma 2:OA) might be different in other versions."}],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Unit Control","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Scripting Commands: Global Effect","Take On Helicopters: Scripting Commands"]}