Jump to content

Recommended Posts

Posted

I've hit a wall.

 

I'm trying to make an AI plane fly to a spawned ground unit groups position and perform the SEAD task (engage air defences) but I can't for the life of me get anything to work. I've lost my mojo. I need help.

 

If anyone has gotten this to work, please share with me how.

Posted

Engage targets or Engage targets in zone ought to do the trick. No need to know the groupId. The useful thing about SEAD tasking is the AI will be aware of the targets fairly easily as long as it picks it up on RWR, thus it will fly to the target. If its not detecting the targets you will need to modify its flight plan or perhaps just issue an orbit command nearish the target so it would detect and engage.

 

local targetArea = trigger.misc.getZone('whereEver')
local newTask = { 
 id = 'EngageTargetsInZone', 
 params = { 
   point = {x = targetArea.point.x, y = targetArea.point.z}, 
   zoneRadius = targetArea.radius, 
   targetTypes = {'SAM', 'AAA'},  
   priority = 1 
 }
}

Group.getByName('seaders'):getController():pushTask(newTask)

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Feef, dynamically spawned.

 

Grimes, thanks! I'll give it a shot. I just need to get a tiny zone on the enemy group but that shouldn't be a problem.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...