HawkHunter Posted April 27, 2019 Share Posted April 27, 2019 I have recently made a little script that uses moose to allow me to spawn Enemy AI aircraft from the radio Menu, it uses "Late Activation" Groups and spawns them in a Trigger zone. The one issue I seem to have, is that when the AI Spawn, they just book it to the nearest Airfield and don't try to pursue or fight, even if I give them a Task(such as CAP or Search and Destroy), and i also tried way points but to no avail. If anyone who knows MOOSE or anything about this, is there anyway to fix it so the AI actually try to fight, I would really appreciate it. Link to comment Share on other sites More sharing options...
johnv2pt0 Posted April 27, 2019 Share Posted April 27, 2019 Don't know Moose well enough off the top of my head, but you can accomplish what you want with MIST. mist.cloneGroup (string groupName, boolean/number task) ex. mist.cloneGroup("fighter1", true) The true means that it will have the tasks you set it up with in the ME. Link to comment Share on other sites More sharing options...
TonyG Posted April 28, 2019 Share Posted April 28, 2019 Can you post the script or the miz file here? Link to comment Share on other sites More sharing options...
HawkHunter Posted April 28, 2019 Author Share Posted April 28, 2019 Here is said script. local Flag1 = USERFLAG:New("Flag_1") local Flag2 = USERFLAG:New("Flag_2") local Flag3 = USERFLAG:New("Flag_3") local Flag4 = USERFLAG:New("Flag_4") local Zone1 = ZONE:New("A2A_1") local Zone2 = ZONE:New("A2A_2") local Zone3 = ZONE:New("A2A_3") local Zone4 = ZONE:New("A2A_4") local A2AE = { "A2A_Easy_A", "A2A_Easy_B" } local A2AN = { "A2A_Norm_A", "A2A_Norm_B" } local A2AH = { "A2A_Hard_A", "A2A_Hard_B" } local A2AD = { "A2A_Diff_A", "A2A_Diff_B" } local ClientSet = SET_GROUP:New() :FilterPrefixes("") :FilterStart() local A2A_Easy_Set = SET_GROUP:New() :FilterPrefixes("A2A_Easy") :FilterStart() local A2A_Norm_Set = SET_GROUP:New() :FilterPrefixes("A2A_Norm") :FilterStart() local A2A_Hard_Set = SET_GROUP:New() :FilterPrefixes("A2A_Hard") :FilterStart() local A2A_Diff_Set = SET_GROUP:New() :FilterPrefixes("A2A_Diff") :FilterStart() local function Flag1Set1() Flag1:Set(1) if Flag2:Is(2) then A2A_Norm_Set:ForEachGroup( function( A2A_Norm_Set ) A2A_Norm_Set:Destroy(true) end ) elseif Flag3:Is(2) then A2A_Hard_Set:ForEachGroup( function( A2A_Hard_Set ) A2A_Hard_Set:Destroy(true) end ) elseif Flag4:Is(2) then A2A_Diff_Set:ForEachGroup( function( A2A_Diff_Set ) A2A_Diff_Set:Destroy(true) end ) end if Flag1:Is(1) then SpawnA2A_Easy_Master = SPAWN:New( "A2A_Easy_Master" ) :InitLimit( 2, 1 ) :InitRandomizeTemplate( A2AE ) :InitRandomizeRoute( 1, 1, 20000 ) :SpawnScheduled( 5, .5 ) :SpawnInZone(Zone1, true) Flag1:Set(2) end end local function Flag2Set1() Flag2:Set(1) if Flag1:Is(2) then A2A_Easy_Set:ForEachGroup( function( A2A_Easy_Set ) A2A_Easy_Set:Destroy(true) end ) elseif Flag3:Is(2) then A2A_Hard_Set:ForEachGroup( function( A2A_Hard_Set ) A2A_Hard_Set:Destroy(true) end ) elseif Flag4:Is(2) then A2A_Diff_Set:ForEachGroup( function( A2A_Diff_Set ) A2A_Diff_Set:Destroy(true) end ) end if Flag2:Is(1) then SpawnA2A_Norm_Master = SPAWN:New( "A2A_Norm_Master" ) :InitLimit( 2, 1 ) :InitRandomizeTemplate( A2AN ) :InitRandomizeRoute( 1, 1, 20000 ) :SpawnScheduled(5, .5) :SpawnInZone(Zone2, true) Flag2:Set(2) end end local function Flag3Set1() Flag3:Set(1) if Flag1:Is(2) then A2A_Easy_Set:ForEachGroup( function( A2A_Easy_Set ) A2A_Easy_Set:Destroy(true) end ) elseif Flag2:Is(2) then A2A_Norm_Set:ForEachGroup( function( A2A_Norm_Set ) A2A_Norm_Set:Destroy(true) end ) elseif Flag4:Is(2) then A2A_Diff_Set:ForEachGroup( function( A2A_Diff_Set ) A2A_Diff_Set:Destroy(true) end ) end if Flag3:Is(1) then SpawnA2A_Hard_Master = SPAWN:New( "A2A_Hard_Master" ) :InitLimit( 2, 1 ) :InitRandomizeTemplate( A2AH ) :InitRandomizeRoute( 1, 1, 20000 ) :SpawnScheduled(5, .5) :SpawnInZone(Zone3, true) Flag3:Set(2) end end local function Flag4Set1() Flag4:Set(1) if Flag1:Is(2) then A2A_Easy_Set:ForEachGroup( function( A2A_Easy_Set ) A2A_Easy_Set:Destroy(true) end ) elseif Flag2:Is(2) then A2A_Norm_Set:ForEachGroup( function( A2A_Norm_Set ) A2A_Norm_Set:Destroy(true) end ) elseif Flag3:Is(2) then A2A_Hard_Set:ForEachGroup( function( A2A_Hard_Set ) A2A_Hard_Set:Destroy(true) end ) end if Flag4:Is(1) then SpawnA2A_Diff_Master = SPAWN:New( "A2A_Diff_Master" ) :InitLimit( 2, 1 ) :InitRandomizeTemplate( A2AD ) :InitRandomizeRoute( 1, 1, 20000 ) :SpawnScheduled(5, .5) :SpawnInZone(Zone4, true) Flag4:Set(2) end end local function RefreshClientMenus() _SETTINGS:SetPlayerMenuOff() ClientSet:ForEachGroup( function( ClientSet ) AirMenuStart = MENU_GROUP:New(ClientSet,"Air to Air Spawn Menu") AirFlag1Set1 = MENU_GROUP_COMMAND:New(ClientSet, "Spawn Air to Air Easy", AirMenuStart, Flag1Set1) AirFlag2Set1 = MENU_GROUP_COMMAND:New(ClientSet, "Spawn Air to Air Normal", AirMenuStart, Flag2Set1) AirFlag3Set1 = MENU_GROUP_COMMAND:New(ClientSet, "Spawn Air to Air Hard", AirMenuStart, Flag3Set1) AirFlag4Set1 = MENU_GROUP_COMMAND:New(ClientSet, "Spawn Air to Air Extreme", AirMenuStart, Flag4Set1) end ) end MenuRefresher = SCHEDULER:New( nil, function() RefreshClientMenus() end, {}, 1, 5 ) Link to comment Share on other sites More sharing options...
DoctorStrop Posted April 28, 2019 Share Posted April 28, 2019 What you have already for menus, but use the MOOSE CAP GCI AI-A2A_Dispatcher, and stop start squadrons with your menu functions. Then you can go up against enemy CAP or GCI interceptors. Windows 10 64bit, Intel i7 6700K, 32GB Corsair 2400Mhz, 970 NVMe 500Gb SSD, GeForce 2080 super, HP Reverb, VKB GF PRO, Thrustmaster Warthog throttle, Thrustmaster Pendular rudders, Windows + DCS :thumbup: My youtube channel Link to comment Share on other sites More sharing options...
Habu_69 Posted April 28, 2019 Share Posted April 28, 2019 Give your spawn group a waypoint with advanced action like SEARCH IN ZONE. Link to comment Share on other sites More sharing options...
Hardcard Posted April 28, 2019 Share Posted April 28, 2019 (edited) @HawkHunter You could've just uploaded the lua script file instead :cry: I didn't have group tasking in mind when I created the original script, it needs to be added (either via ME tasks, like Habu_69 has suggested, or via scripted tasks). Edited April 28, 2019 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
HawkHunter Posted April 28, 2019 Author Share Posted April 28, 2019 Sorry about pasting it, dumb error. Ill do what Habu Suggested and give that a try Thanks for helping me out Link to comment Share on other sites More sharing options...
loctarios Posted February 25, 2020 Share Posted February 25, 2020 When i change to another slot, the "Other" menu disappear what's wrong? Link to comment Share on other sites More sharing options...
fargo007 Posted February 25, 2020 Share Posted February 25, 2020 Give your spawn group a waypoint with advanced action like SEARCH IN ZONE. This. I use "SEARCH THEN ENGAGE IN ZONE." Have fun. Don't suck. Kill bad guys. https://discord.gg/blacksharkden/ Link to comment Share on other sites More sharing options...
Pikey Posted February 25, 2020 Share Posted February 25, 2020 Sounds like its the plane templates that are faulty, the missions Task is copied from those. if there is none, planes do nothing. I would ask if there are any errors, but I'm terrified you might post it ;) :) ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING * Link to comment Share on other sites More sharing options...
loctarios Posted February 26, 2020 Share Posted February 26, 2020 This. I use "SEARCH THEN ENGAGE IN ZONE." Tried that... No luck Link to comment Share on other sites More sharing options...
loctarios Posted February 26, 2020 Share Posted February 26, 2020 Sounds like its the plane templates that are faulty, the missions Task is copied from those. if there is none, planes do nothing. I would ask if there are any errors, but I'm terrified you might post it ;) :) I will attach, Thank You!Radio Spawn.lua Link to comment Share on other sites More sharing options...
Pikey Posted February 26, 2020 Share Posted February 26, 2020 It looks fine and doesnt help. The mission task is copied from the spawn templates in the mission itself. ___________________________________________________________________________ SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING * Link to comment Share on other sites More sharing options...
Recommended Posts