ChuckIV Posted December 16, 2019 Posted December 16, 2019 Hi MOOSE gurus! Here's what I'm trying to do... I have a group that's following my group called "Yellow_Group". What does work is that they follow my own Blue_Group perfectly using MOOSE lua code, and when I ask them to attack the enemy in the zone defined in the ME, they stop ALL tasks (following), which is what I want them to do, but then they just RTB. Funny thing is, when asked to join in a different squadron location, they cleartask perfectly, and join up. They don't attack in the zone as planned however. I would like them to engage any enemy in the zone when tasked to do so. I'm attempting to use a PatrolZone even though I'm not having the Yellow_Group actually patrol; they are just following me until asked to attack. After all the enemy have been dispatched, I'll just call them back to our squadron formation. Here's basically what the code looks like so far... Take a look at the code, and tell me what you think. I appreciate any help you can offer. Thanks!! PatrolZone = ZONE:New( "UK_PATROL_ZONE" ) -- zone defined in ME .miz file AICapZone = AI_CAP_ZONE:New( PatrolZone, 200, 10000, 325, 435 ) function CONTROLLABLE:ClearTasks(FGroup) self:F2(FGroup) local DCSControllable = self:GetDCSObject(FGroup) if DCSControllable then local Controller = self:_GetController(FGroup) Controller:resetTask(FGroup) return self end return nil end function GP_ATTACK_BANDITS( FGroup ) FGroup:ClearTasks() AICapZone:SetControllable( FGroup ) AICapZone:SetEngageRange( 20000 ) -- Sets the Engage Range to 20,000 meters/10.8nm AICapZone:__Start( 1 ) end FGroup:ClearTasks() -- this is actually called in another function and IS working - the group stops ALL tasks and starts to RTB -- Then I try this call, and nothing happens -- group still is RTB GP_ATTACK_BANDITS( Yellow_Group ) What am I doing wrong here? Any ideas? 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
ChuckIV Posted December 20, 2019 Author Posted December 20, 2019 PLEASE REMOVE THIS POST PLEASE REMOVE THIS POST - I figured out why my groups were not attacking. Thank you, 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
Delta99 Posted December 21, 2019 Posted December 21, 2019 What would be better is to post your solution in case others run into the same issue. My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
ChuckIV Posted December 22, 2019 Author Posted December 22, 2019 (edited) Solution I removed FGroup from the parenthesis, and it starting working. So, instead of (FGroup) I just used (), and it worked! *** In addition, I set the ROE for the groups to weapons free and no reaction to threats *** Edited December 22, 2019 by ChuckIV Adding more info "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