Kydoimos 915 Posted April 4, 2014 Hi all! I know this issue of forcing AI to fire launchers has cropped up a few times - but many of the existing threads are quite old and I was wondering - has there been any news on this? Is there a way to make AI fire a launcher at a target via a script? I've tried a lot of things, but haven't had any luck. If anyone knows of anything that works, I'd love to hear. Or, if there's a thread with a tried and tested method, I'd be happy to try there? Share this post Link to post Share on other sites
Kydoimos 915 Posted April 7, 2014 Does anybody know of a solution? It seems strange something so simple should prove so difficult! Share this post Link to post Share on other sites
f2k sel 164 Posted April 8, 2014 Welcome to the World of Arma where simple is made difficult. Even when you can get them to fire launchers they won't use the targeting system so it's kind of point less. I did get a unit using the missile script to direct at launched rocket to the target but was never happy with the result. Share this post Link to post Share on other sites
-ami- mofo 13 Posted April 8, 2014 Total noob talking here but if you removed rifle/pistol from the AI AT guy does that not make him use the launcher? Share this post Link to post Share on other sites
pipyn1970 19 Posted April 8, 2014 If your not intended to be close & you want the enemy to fire launches why don't you try unitcapture? I've not tried it yet myself but am planning on using that method for enemy giving us proper suppression for an upcoming mission. Just need to wait for my new computer to arrive. If you do try that method let us know how it went. I recall that with unitplay the rockets will only go forwards so lockons won't work. Hope it works out for you Share this post Link to post Share on other sites
Kydoimos 915 Posted April 8, 2014 Heya Pipyn - you know, that was one of the first things I tried! No success at all! Seems it'll work fine for vehicles and aircraft - but not infantry! Share this post Link to post Share on other sites
Grumpy Old Man 3540 Posted April 8, 2014 What kind of target do you want to be fired at? Share this post Link to post Share on other sites
Kydoimos 915 Posted April 8, 2014 I would like to be able to fire at an invisible helipad or marker - failing that, a vehicle would suffice... ---------- Post added at 19:25 ---------- Previous post was at 19:25 ---------- Ooh - maybe a helicopter? To be honest, it depends on what can be achieved! Share this post Link to post Share on other sites
Rocksteady 10 Posted April 9, 2014 Ooh - maybe a helicopter? seen other threads about this and always wondered what it was because it seems to work fine for me. Add a reveal in there for good measure and it should work. Just tested this at night with a heli about 1km away, ungrouped AA soldier didn't notice it at first (I could just see it), but shot it down immediately once the addaction was triggered. flying heli named air1, AA soldier named dumbAI players init: this addaction [ "ffs just shoot", { dumbAI reveal [air1,4] ; dumbAI doTarget air1; dumbAI doFire air1;}]; Cheers. Share this post Link to post Share on other sites
f2k sel 164 Posted April 9, 2014 The reveal and dotarget are doing the work and then the AI kicks in and does the rest. Try it on a friendly, empty vehicle or change the weapon to a AT, they just ignore you. Share this post Link to post Share on other sites
Rocksteady 10 Posted April 9, 2014 (edited) Try it on a friendly, empty vehicle or change the weapon to a AT, they just ignore you. yea fair enough, reveal is all you probably need for an opfor target, but I did try it on both a friendly and empty vehicle and it worked both times. Don't think i'm special, why does everyone have a problem with this? Heres the AI shooting a friendly tank: http://i.imgur.com/cAJ2G3x.jpg (212 kB) Edited April 9, 2014 by Rocksteady Share this post Link to post Share on other sites
IndeedPete 1038 Posted April 9, 2014 yea fair enough, reveal is all you probably need for an opfor target, but I did try it on both a friendly and empty vehicle and it worked both times. Don't think i'm special, why does everyone have a problem with this? Heres the AI shooting a friendly tank: http://i.imgur.com/cAJ2G3x.jpg (212 kB) Strange, doFire never worked for me in Arma 3. At least not with rifles or pistols. On the topic at hand: if firing with doFire fails one can also try forceWeaponFire. It's a bit tricky if you have a generic apporach but it works with concrete values. Haven't tested it with launchers though. Share this post Link to post Share on other sites
f2k sel 164 Posted April 9, 2014 (edited) Rocksteady you code is working on empty vehicles. In fact only unit dofire targ is needed. I tried it in A2 this morning and it didn't work by using a trigger and they wouldn't fire on friendly. I'm sure I'd tried it in A3 the other day but I may have switched to gamelogic as the target by then. So they will fire at Vehicles crew or not. They won't fire AA at flying Aircraft even if they could easily hit it. (understandable I guess) They still won't fire on objects. Of coarse there is now another issue they use all their ammo if the object is not destroyed. If they use all their ammo and the target still exists they start to rotate constantly after a while. If they're in your group you can issue the noTarget command, does anyone know what the scripting version of this command would be? Edited April 9, 2014 by F2k Sel Share this post Link to post Share on other sites
Kydoimos 915 Posted April 9, 2014 Another weird thing I've found on the subject of launchers is: AAF won't attack FIA trucks, MG offroads etc. (and yes, I have switched Independents Friendly to Nobody!). Not sure if this applies to all AT units vs. cars or not... Share this post Link to post Share on other sites
cobra4v320 27 Posted April 9, 2014 (edited) If they're in your group you can issue the noTarget command, does anyone know what the scripting version of this command would be? soldierOne commandTarget OBJNULL Leader says cancel target and no target randomly. Edited April 9, 2014 by cobra4v320 Share this post Link to post Share on other sites
f2k sel 164 Posted April 9, 2014 Thanks that works cobra4v320, how about a command to stop dofire for units not in my group? Share this post Link to post Share on other sites
Rocksteady 10 Posted April 11, 2014 They won't fire AA at flying Aircraft even if they could easily hit it. I'm not sure why you keep arguing this point, they definitely will fire if commanded. Even if the object has a low knowsabout preventing target and lockon, reveal will fix that. Here's an ungrouped AI firing on a friendly Helo with the same basic scripting. Firing on a friendly tank: firing on an object will need some invisible soldier trickery I believe. ---------- Post added at 03:54 ---------- Previous post was at 03:53 ---------- Suggest you check your mods if you can't get this to work. Share this post Link to post Share on other sites
f2k sel 164 Posted April 11, 2014 Sorry that was typo it should read AT, if you look at the end of the line is does say that was understandable. I know about invisibleman (unit who flies the drone is one); Share this post Link to post Share on other sites