Bunny Clark Posted June 23, 2019 Share Posted June 23, 2019 Alright, I'm building a mission where a pair of Hornets need to attack armed speedboats with Mavericks. One of them is the player, so that's fine, but I'm trying to get the AI wingman to actually be of any use. Ordering him to "attack ground targets" results in him telling me he can't do that. I tried setting the waypoint to attack the ships, but that's not an option. I tried making a search and engage area, set to naval units, but when I order him to engage mission targets he says "roger" and then flies the waypoints without attacking the targets he flies over at all. How can I get him to actually shoot at the ships? Oil In The Water Hornet Campaign. Bunny's: Form-Fillable Controller Layout PDFs | HOTAS Kneeboards | Checklist Kneeboards Link to comment Share on other sites More sharing options...
Hardcard Posted June 24, 2019 Share Posted June 24, 2019 (edited) Set the hornet group task/role to Anti-ship Strike or CAS, your wingman should engage the speedboats automatically. However, if you want your wingman to start the attack run at a specific moment, you can do the following: - Set the hornet group task/role to something that ignores ground/sea targets, like CAP, Reconnaissance, etc. , this way your wingman won't engage out of turn. - Run the following script at the appropriate moment using a DO SCRIPT trigger (required fields marked in red. Don't remove the quotation marks!): local Boat_Killer = Unit.getByName("[color="red"][i][u]Unit name[/u] of the hornet [u]wingman[/u] in ME[/i][/color]") local Boat_Group = Group.getByName("[color="Red"][i][u]Group name[/u] of the speedboat group in ME[/i][/color]") local Engage_Boats = { id = 'AttackGroup', params = { groupId = Boat_Group:getID(), weaponType = 2956984318, expend = "One", attackQtyLimit = true, attackQty = 1, } } Boat_Killer:getController():setTask(Engage_Boats) - Don't equip the hornet wingman with AGM-65F mavs, the AI doesn't seem to fire them at speedboats. Use AGM-65E mavs instead. Edited June 24, 2019 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Habu_69 Posted June 24, 2019 Share Posted June 24, 2019 @Hardcard: Please explain "weaponType". Link to comment Share on other sites More sharing options...
Hardcard Posted June 24, 2019 Share Posted June 24, 2019 (edited) Hi Habu weaponType is an internal weapon enumerator that the DCS API uses to select weapons for tasking. It's explained here In this case, I decided to use a combo enumerator, which includes any AG weapons (laser mavs are included in the ASM group): 2956984318 = AnyAGWeapon (BuiltInCannon + GUN_POD + AnyBomb + AnyRocket + AnyASM) [color="Blue"]-- I could've used the following enumerator as well:[/color] 3221225470 = AnyWeapon (AnyBomb + AnyRocket + AnyMissile + Cannons) I've recently learned that, when dealing with tasks, the DCS API doesn't use the "typical" weapon type values that can be obtained using methods like Object:getTypeName() Instead, it uses weird internal enumerators, which are basically numbers... problem is that those enumerators don't seem to be accessible via known scripting methods (at least the ones I know) Fortunately, I found an alternative way to reveal these "hidden" enumerators (other than checking the enumerator list from the Hoggit Wiki, that is :D): 1- Program the task(s) using ME alone (set all the task options to the values you want to know the enumerators for) 2- Save the mission 3- Open the .miz file using winzip / winrar / 7zip, etc. 4- Grab the unformatted file named "mission" and extract it 5- Turn it into a lua file 6- Open it with your lua editor 7- Find the task identifier, all the relevant internal enumerators should be there, indexed in the task table Edited June 24, 2019 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Colmillo Posted June 24, 2019 Share Posted June 24, 2019 Thanks @Harcard, nice work! [sIGPIC][/sIGPIC] Intel(R) Core(TM) i9-10900KF CPU @ 3.70GHz 3.70 GHz ROG STRIX Z490-E GAMING RAM 128 M.2*2 2T total SSD*3 2.5T total GeForce RTX 3090 Orion2 HOTAS F-16EX Saitek Pro Rudder Link to comment Share on other sites More sharing options...
Habu_69 Posted June 24, 2019 Share Posted June 24, 2019 @Hardcard. Much obliged for the enlightenment, O Learned Master. Link to comment Share on other sites More sharing options...
Hardcard Posted June 25, 2019 Share Posted June 25, 2019 @Colmillo @Habu_69 You're welcome, guys. Hey, Colmillo... can you send me your rig as thanks? (kind of jealous over here ;) ) Btw, I'm no master (by any stretch), just a newbie who learns stuff and shares it it with others :thumbup: [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Bunny Clark Posted June 25, 2019 Author Share Posted June 25, 2019 - Don't equip the hornet wingman with AGM-65F mavs, the AI doesn't seem to fire them at speedboats. Use AGM-65E mavs instead. This seems to be the crux of the issue I'm having, since I've managed to get him to make gun runs on the boats, but never fire his IR Mavs. Wouldn't I need some way to laser designate the boats for the AGM-65Es? Or can the AI guide them with magic? Oil In The Water Hornet Campaign. Bunny's: Form-Fillable Controller Layout PDFs | HOTAS Kneeboards | Checklist Kneeboards Link to comment Share on other sites More sharing options...
Colmillo Posted June 25, 2019 Share Posted June 25, 2019 @Colmillo @Habu_69 You're welcome, guys. Hey, Colmillo... can you send me your rig as thanks? (kind of jealous over here ;) ) Btw, I'm no master (by any stretch), just a newbie who learns stuff and shares it it with others :thumbup: hahahaha No problem!!, just wait.. till Bitcoin reach USD150.000 [sIGPIC][/sIGPIC] Intel(R) Core(TM) i9-10900KF CPU @ 3.70GHz 3.70 GHz ROG STRIX Z490-E GAMING RAM 128 M.2*2 2T total SSD*3 2.5T total GeForce RTX 3090 Orion2 HOTAS F-16EX Saitek Pro Rudder Link to comment Share on other sites More sharing options...
Hardcard Posted June 25, 2019 Share Posted June 25, 2019 (edited) I assumed the hornets were equipped with their own laser pointer (ok, they need the AN/AAS-38 "Nitehawk" pod for that). But, hey, you can always add a predator drone to the mission and have it lase the boats on command. Edited June 25, 2019 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Bunny Clark Posted June 26, 2019 Author Share Posted June 26, 2019 I assumed the hornets were equipped with their own laser pointer (ok, they need the AN/AAS-38 "Nitehawk" pod for that). But, hey, you can always add a predator drone to the mission and have it lase the boats on command. Can AI Hornets equip pods that human controlled planes can't use? As far as I know Hornets can't lase anything for themselves yet until some targeting pods get released later in early access. There's already a Predator in the mission, making it lase for the wingman may not be too hard? At the very least, it's another thing for me to learn how to do! Oil In The Water Hornet Campaign. Bunny's: Form-Fillable Controller Layout PDFs | HOTAS Kneeboards | Checklist Kneeboards Link to comment Share on other sites More sharing options...
Recommended Posts