Polygon 11 Posted December 15, 2014 I want to force AI shoot at a spot. Ie, AI kills captives one after another and doesn't release the trigger when a captive is dead. For effect, the AI puts more bullets into a dead body. Or: you're in a firing range, camera is following other AI shooters and teleporting to the spots they hit with single bursts, etc. Share this post Link to post Share on other sites
SavageCDN 231 Posted December 15, 2014 I think this is what you are looking for: https://community.bistudio.com/wiki/fireAtTarget or maybe this: https://community.bistudio.com/wiki/doFire Haven't used either before myself. Share this post Link to post Share on other sites
Greenfist 1863 Posted December 15, 2014 FireAtTarget seems to work only with vehicles. And doFire doesn't work with dead/inanimate targets, the unit only aims at it but doesn't fire. I guess you first need to aim (or kill a captive) with doFire for example and then forceWeaponFire right afterwards. Share this post Link to post Share on other sites
SavageCDN 231 Posted December 15, 2014 Good to know thanks.. it's never easy is it? :p Share this post Link to post Share on other sites
bangabob 42 Posted December 15, 2014 You may find this useful. It is a small script that makes AI shoot a target forever. It can be called in the units init field via null = [this,target1] execVM "shoot.sqf"; //shoot.sqf _unit = (this select 0); _target = (_this select 1); _unit dotarget _target; sleep 2; while {alive _unit} do { sleep 0.3; _unit setAmmo [currentWeapon _unit, 1]; _unit forceWeaponFire [ weaponState _unit select 1, weaponState _unit select 2]; }; Share this post Link to post Share on other sites
palatine 24 Posted August 18, 2017 Hi sorry to bring up this old stuff again. I need to make a Praetorian1C to fire at ground unit (sodier, zombie, etc). I tried using trigger combine with doTarget, doFire, but no luck. Also have tried Bangabob's script above - but returned error on forceWeaponFire. Any advice? Thanks Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted August 18, 2017 3 hours ago, palatine said: Hi sorry to bring up this old stuff again. I need to make a Praetorian1C to fire at ground unit (sodier, zombie, etc). I tried using trigger combine with doTarget, doFire, but no luck. Also have tried Bangabob's script above - but returned error on forceWeaponFire. Any advice? Thanks shootme.sqf in mission root: params ["_target"]; _laserT = createVehicle ["LaserTargetW", [0,0,0], [], 0, "NONE"]; _laserT attachto [_target, [0, 0, 0]]; _cleanUp = [_target, _laserT] spawn { waituntil {!alive (_this select 0)}; deletevehicle (_this select 1); true }; In the infantry init field: _bombToTheFace = [this] execVM "shootme.sqf"; Cheers 1 Share this post Link to post Share on other sites
palatine 24 Posted August 18, 2017 Hi Grumpy, thanks, but still phalanx won't fire at the target. Is there any restriction in the weapon/ammo that makes phalanx only firing on air target? This site https://configs.arma3.ru/ was helpful to me, but it's only up to 1.62, so I can't find phalanx config. :( Share this post Link to post Share on other sites
palatine 24 Posted August 18, 2017 I think I got the solution...I just know that actually we can add/remove vehicle weapons during game runtime (without mod/addons). So a mere simple script like this will make the phalanx noisy :D this addWeapon "gatling_20mm"; this addMagazine "2000Rnd_20mm_shells"; this addMagazine "2000Rnd_20mm_shells"; Share this post Link to post Share on other sites