ChuckIV Posted January 7, 2020 Posted January 7, 2020 Can someone show me with MOOSE code how to have a plane attack a hangar with a bomb? I believe the bomb uses (Weapon Type = 240) Let's say the plane is called "Plane 1" and the hangar is called "Hangar B" both in the editor. Thanks in advance! ChuckIV "Never in the field of human conflict was so much owed by so many to so few." Winston Churchill SYSTEM: Processor - Intel® Core i9-9900KF CPU @ 3.60GHz 3600MHz water-cooled Installed memory (RAM) - 32.0 GB 64-bit Operating System, x64-based processor Windows 10 & DCS on SSD Video Card - water-cooled NVIDIA GeForce RTX 2080 Ti Internet: Cable 200Mbps 12Mbps
johnv2pt0 Posted January 7, 2020 Posted January 7, 2020 Your scenario won't allow for using the ME advanced waypoint action or triggered action of bombing? I can't help with MOOSE, but just want to make sure that you know that option is available to you.
ChuckIV Posted January 8, 2020 Author Posted January 8, 2020 Thanks johny johnv2pt0, Thanks for the reply. I do know how to do this in the editor; I'm learning how MOOSE works and collecting snippets of code and storing them for my future missions I create. At this time I'd really like to see how I can use MOOSE code to have a plane bomb a STATIC target and have groups get into certain formations (again without flags in the ME). ChuckIV "Never in the field of human conflict was so much owed by so many to so few." Winston Churchill SYSTEM: Processor - Intel® Core i9-9900KF CPU @ 3.60GHz 3600MHz water-cooled Installed memory (RAM) - 32.0 GB 64-bit Operating System, x64-based processor Windows 10 & DCS on SSD Video Card - water-cooled NVIDIA GeForce RTX 2080 Ti Internet: Cable 200Mbps 12Mbps
johnv2pt0 Posted January 8, 2020 Posted January 8, 2020 I think MOOSE clones groups that it creates, so you might be able to set the ai task on your example plane, and then use the pushAITask SSE function within your moose script. https://wiki.hoggitworld.com/view/DCS_func_pushAITask God speed sir!
ChuckIV Posted January 8, 2020 Author Posted January 8, 2020 I'm trying to use :TaskAttackMapObject (see below)... Hardcard, any insights to this code - why it isn't working?? local Yellow_Group = GROUP:FindByName( "Spitfire Yellow GP P7350" ) local Red_Group = GROUP:FindByName( "Spitfire Red GP P7350" ) local Maupertis_Hangar_B_Vec2 = STATIC:Find("Hangar B", true):GetVec2() local Azeville_Hangar_003_Vec2 = STATIC:Find("Hangar Azeville #003", true):GetVec2() do function CONTROLLABLE:TaskAttackMapObject( Vec2, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, WeaponType ) self:F2( { self.ControllableName, Vec2, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, WeaponType } ) local DCSTask DCSTask = { id = 'AttackMapObject', params = { point = Vec2, groupAttack = GroupAttack or false, expend = WeaponExpend or "Auto", attackQtyLimit = AttackQty and true or false, attackQty = AttackQty, directionEnabled = Direction and true or false, direction = Direction, altitudeEnabled = Altitude and true or false, altitude = Altitude or 30, weaponType = WeaponType, }, }, self:T3( { DCSTask } ) return DCSTask end Yellow_Group:TaskAttackMapObject( Maupertis_Hangar_B_Vec2, true, 1, 3, 0, 2590.8, 240 ) Red_Group:TaskAttackMapObject( Azeville_Hangar_003_Vec2, true, 1, 3, 0, 2590.8, 240 ) end "Never in the field of human conflict was so much owed by so many to so few." Winston Churchill SYSTEM: Processor - Intel® Core i9-9900KF CPU @ 3.60GHz 3600MHz water-cooled Installed memory (RAM) - 32.0 GB 64-bit Operating System, x64-based processor Windows 10 & DCS on SSD Video Card - water-cooled NVIDIA GeForce RTX 2080 Ti Internet: Cable 200Mbps 12Mbps
Recommended Posts