{"name":"doFire","title":"doFire","type":"command","url":"https://community.bistudio.com/wiki/doFire","revid":378648,"updated":"2026-05-17T15:10:41Z","groups":["Unit Control"],"status":"ok","games":{"ofp":"1.00","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.00","arma3_since":"0.50","locality":{"argument":"local","effect":"global"},"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","params":[{"name":"unit","type":"Object or Array of Objects","type_expr":"Object | Array<Object>"},{"name":"target","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"unit"},"right":{"text":"target"}}],"examples":[{"code":["_ESoldier1 doFire _WSoldier1;"]}],"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."}]}