Habu_69 Posted February 19, 2019 Share Posted February 19, 2019 Is it possible to use MOOSE to catalogue and destroy all units with "xyz" in their unit name? Short answer is, yes. Create a SET_UNIT using :FilterPrefix( "xyz" ), then create a function ForEachUnit to destroy the units in the set. Link to comment Share on other sites More sharing options...
Delta99 Posted February 19, 2019 Share Posted February 19, 2019 I am trying to copy waypoints from group1(Air CLIENT group) to group2 (Air CLIENT group), that way i dont need to do it manually on ME as all the groups have the same waypoints on my missions Not possible through the scripting API as far as I know for client waypoints. My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements Link to comment Share on other sites More sharing options...
Silvern Posted February 19, 2019 Share Posted February 19, 2019 Short answer is, yes. Create a SET_UNIT using :FilterPrefix( "xyz" ), then create a function ForEachUnit to destroy the units in the set. I used the "Destroy" but this deletes the unit. I want to destroy the unit by blowing it up, so that there are some remains like if you would destroy a unit with a bomb. Link to comment Share on other sites More sharing options...
Hardcard Posted February 19, 2019 Share Posted February 19, 2019 I used the "Destroy" but this deletes the unit. I want to destroy the unit by blowing it up, so that there are some remains like if you would destroy a unit with a bomb. :Destroy() will remove the unit from the map without leaving a "carcass". You'll probably need to create an actual explosion in order to achieve the desired effect, I'd try :Explosion(). Now, I don't know if the explosions generated in such a way actually deal damage to objects, you'll need to test it. [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Habu_69 Posted February 19, 2019 Share Posted February 19, 2019 :Explosion() very much does destroy the unit just like hitting it with a bomb or artillery. Link to comment Share on other sites More sharing options...
A101Wayz Posted February 19, 2019 Share Posted February 19, 2019 Couple quick (hopefully) questions... 1) Is there a way to spawn single Units and then join them as a group? For instance I want to create a group of 1-4 aircraft (all identical in aircraft type and loadout). Would I have to (in the ME) create a 1 unit group AND a 2 unit group AND a 3 unit group AND a 4 unit group, and then spawn the group I want? As it stands, I created a single 4 unit group, spawn it and :Destroy(false) the units I don't want. But that just seems like a workaround... 2) Scoring. I create a mission using MOOSE, fly it, shoot down several aircraft, and when I end the mission, the mission results say that I've done absolutely nothing... Is there something I need in my mission script to track the scoring? Wayz Out Intel Core i9 9900K | ASUS ROG Strix Z390E Gaming MB | G.Skill Ripjaws V 32gb DDR4-3200 | GeForce RTX 2080 Ti | Samsung 970 EVO Plus NVMe HTC Vive Pro VR | Logitech G x56 HOTAS | Logitech G PRO Pedals Link to comment Share on other sites More sharing options...
A101Wayz Posted February 25, 2019 Share Posted February 25, 2019 Can I kill a thread, or what? OK, lets try this question... Why is it that no matter what distance I put as the EngagmentDistance parameter for this task, the escorts leave the escortee and fly directly at an enemy target the second it's detected, regardless of the distance to target? unit:TaskEscort(LeadGroup,formation:GetVec3(),LastWP,EngageDistance, TargetList) Shouldn't the escorts ignore any targets until the target approaches to within EngagementDistance? Wayz Out Intel Core i9 9900K | ASUS ROG Strix Z390E Gaming MB | G.Skill Ripjaws V 32gb DDR4-3200 | GeForce RTX 2080 Ti | Samsung 970 EVO Plus NVMe HTC Vive Pro VR | Logitech G x56 HOTAS | Logitech G PRO Pedals Link to comment Share on other sites More sharing options...
Delta99 Posted February 25, 2019 Share Posted February 25, 2019 Couple quick (hopefully) questions... 1) Is there a way to spawn single Units and then join them as a group? For instance I want to create a group of 1-4 aircraft (all identical in aircraft type and loadout). Would I have to (in the ME) create a 1 unit group AND a 2 unit group AND a 3 unit group AND a 4 unit group, and then spawn the group I want? As it stands, I created a single 4 unit group, spawn it and :Destroy(false) the units I don't want. But that just seems like a workaround... 2) Scoring. I create a mission using MOOSE, fly it, shoot down several aircraft, and when I end the mission, the mission results say that I've done absolutely nothing... Is there something I need in my mission script to track the scoring? 1. The DCS scripting environment unfortunately doesn't allow joining groups. I'd bet this was a requested feature going back many many years but not certain. 2. The debriefing screen is completely separate from Moose scoring. Further anything spawned units will not be reflected in the scoring tallies for number of planes killed at the top left of the briefing. Once again a DCS limitation that only ED can fix. I believe those numbers only count what you create in the ME. If you've implemented the MOOSE Scoring class it is separate. My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements Link to comment Share on other sites More sharing options...
Delta99 Posted February 25, 2019 Share Posted February 25, 2019 Can I kill a thread, or what? OK, lets try this question... Why is it that no matter what distance I put as the EngagmentDistance parameter for this task, the escorts leave the escortee and fly directly at an enemy target the second it's detected, regardless of the distance to target? unit:TaskEscort(LeadGroup,formation:GetVec3(),LastWP,EngageDistance, TargetList) Shouldn't the escorts ignore any targets until the target approaches to within EngagementDistance? You must be doing something wrong or there is a bug somewhere. Has worked for me for ages. You might have to do some further debugging making sure your EngageDistance is correct. Of course with DCS it could just be a new bug ED has introduced or something that has changed in Moose recently (although I don't think escort has changed in ages). My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements Link to comment Share on other sites More sharing options...
A101Wayz Posted February 25, 2019 Share Posted February 25, 2019 You must be doing something wrong or there is a bug somewhere. Has worked for me for ages. You might have to do some further debugging making sure your EngageDistance is correct. Of course with DCS it could just be a new bug ED has introduced or something that has changed in Moose recently (although I don't think escort has changed in ages). Thanks for the response! IS there a certain combination of ROE and ROT that need to be set? I've tried not setting them, and several combinations (though not all). All resulted in various (and sometimes hilarious) results. But none resulted as expected... Guess I just need to keep experimenting... Wayz Out Intel Core i9 9900K | ASUS ROG Strix Z390E Gaming MB | G.Skill Ripjaws V 32gb DDR4-3200 | GeForce RTX 2080 Ti | Samsung 970 EVO Plus NVMe HTC Vive Pro VR | Logitech G x56 HOTAS | Logitech G PRO Pedals Link to comment Share on other sites More sharing options...
A101Wayz Posted February 25, 2019 Share Posted February 25, 2019 OK, I think I just got it figured out... originally, I was issuing the TaskEscort to each UNIT in the group (to get a nice looking, tight formation)... I changed the TaskEscort to task follow for each unit. Then issued a TaskEscort to the GROUP of escorts... and viola! it worked.:doh: Like so: local units = escortgroup:GetUnits() for i, unit in ipairs(units) do local task = unit:TaskFollow(LeadGroup,formation[i]:GetVec3(),LastWP) unit:SetTask(task,1) end local task = escortgroup:TaskEscort(LeadGroup,formation[1]:GetVec3(),LastWP,EngageDistance, TargetList) escortgroup:SetTask(task,1) Wayz Out Intel Core i9 9900K | ASUS ROG Strix Z390E Gaming MB | G.Skill Ripjaws V 32gb DDR4-3200 | GeForce RTX 2080 Ti | Samsung 970 EVO Plus NVMe HTC Vive Pro VR | Logitech G x56 HOTAS | Logitech G PRO Pedals Link to comment Share on other sites More sharing options...
Delta99 Posted February 26, 2019 Share Posted February 26, 2019 OK, I think I just got it figured out... originally, I was issuing the TaskEscort to each UNIT in the group (to get a nice looking, tight formation)... I changed the TaskEscort to task follow for each unit. Then issued a TaskEscort to the GROUP of escorts... and viola! it worked.:doh: Like so: local units = escortgroup:GetUnits() for i, unit in ipairs(units) do local task = unit:TaskFollow(LeadGroup,formation[i]:GetVec3(),LastWP) unit:SetTask(task,1) end local task = escortgroup:TaskEscort(LeadGroup,formation[1]:GetVec3(),LastWP,EngageDistance, TargetList) escortgroup:SetTask(task,1) I don't think anything works on the UNIT level. At least not typically and I would doubt this is an exception except if you are mixing the FORMATION CLASS stuff with ESCORT class stuff. I don't think they are made to work together and might be why you are seeing odd stuff. FORMATION I believe was mainly for WW2 formations and is completely separate to ESCORT as far as I understand it. I haven't touched the FORMATION class so not 100% sure though. I suggest you just get rid of any of the UNIT stuff here as it likely isn't doing anything or its applying it at the group level anyway or its just going to cause some sort of very odd behaviour. My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements Link to comment Share on other sites More sharing options...
A101Wayz Posted February 27, 2019 Share Posted February 27, 2019 I don't think anything works on the UNIT level. At least not typically and I would doubt this is an exception except if you are mixing the FORMATION CLASS stuff with ESCORT class stuff. I don't think they are made to work together and might be why you are seeing odd stuff. FORMATION I believe was mainly for WW2 formations and is completely separate to ESCORT as far as I understand it. I haven't touched the FORMATION class so not 100% sure though. I suggest you just get rid of any of the UNIT stuff here as it likely isn't doing anything or its applying it at the group level anyway or its just going to cause some sort of very odd behaviour. Actually, It's working quite well now that I've separated the tasks to Follow and Escort, rather than trying to accomplish it in one single task... Escorts don't leave the asset (until Bingo Fuel), they don't let the enemy slide right up into the formation and shoot down the asset, and they don't run away and leave the asset to fend for himself. (all of which I've seen while trying to use just TaskEscort() ) Just something I wanted to accomplish for a WIP mission I'm setting up for the anticipated F-14 release, next month (hopefully).EscortTest.luaEscort Test.miz Wayz Out Intel Core i9 9900K | ASUS ROG Strix Z390E Gaming MB | G.Skill Ripjaws V 32gb DDR4-3200 | GeForce RTX 2080 Ti | Samsung 970 EVO Plus NVMe HTC Vive Pro VR | Logitech G x56 HOTAS | Logitech G PRO Pedals Link to comment Share on other sites More sharing options...
Delta99 Posted February 27, 2019 Share Posted February 27, 2019 Actually, It's working quite well now that I've separated the tasks to Follow and Escort, rather than trying to accomplish it in one single task... Escorts don't leave the asset (until Bingo Fuel), they don't let the enemy slide right up into the formation and shoot down the asset, and they don't run away and leave the asset to fend for himself. (all of which I've seen while trying to use just TaskEscort() ) Just something I wanted to accomplish for a WIP mission I'm setting up for the anticipated F-14 release, next month (hopefully). I looked it up and TaskFollow is at the UNIT level. Its probably something FlightControl cooked up for the formation stuff mainly for WW2. But just a guess. I've never required anything other than Escort and neither have others and seems to work fine. I still think you will likely see odd behaviour like the following units won't engage (just the lead will engage). But if not and it all works then excellent. It would be great if these two things can mix therefore you can create some interesting escorting formations. My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements Link to comment Share on other sites More sharing options...
A101Wayz Posted February 27, 2019 Share Posted February 27, 2019 I looked it up and TaskFollow is at the UNIT level. Its probably something FlightControl cooked up for the formation stuff mainly for WW2. But just a guess. I've never required anything other than Escort and neither have others and seems to work fine. I still think you will likely see odd behaviour like the following units won't engage (just the lead will engage). But if not and it all works then excellent. It would be great if these two things can mix therefore you can create some interesting escorting formations. The aesthetics of it all was what I was going for... Mainly on tankers. Now you have to be aware of those escort aircraft when you're refueling, and when you disconnect and peel off... (Plus it's kinda cool to be refueling and look over to see the pilot's helmet in the escort next to you. :D ) Wayz Out Intel Core i9 9900K | ASUS ROG Strix Z390E Gaming MB | G.Skill Ripjaws V 32gb DDR4-3200 | GeForce RTX 2080 Ti | Samsung 970 EVO Plus NVMe HTC Vive Pro VR | Logitech G x56 HOTAS | Logitech G PRO Pedals Link to comment Share on other sites More sharing options...
Sierra99 Posted March 1, 2019 Share Posted March 1, 2019 Gentlemen, OK I got a interesting one for ya... I have been working on the attached mission for about a week. When I launch it single player...it works as expected. The GCICAP Script , range scripts and Mist elements are all available. When I launch it on a server...Everything works except for the Range Scripts. I cant figure out why. If someone cold take a look at it with a fresh set of eyes I'd appreciate it. Thanks in advanceAir Tasking Order (ATO) FOXTROT.miz [sIGPIC][/sIGPIC] Primary Computer ASUS Z390-P, i7-9700K CPU @ 5.0Ghz, 32GB Patriot Viper Steel DDR4 @ 3200Mhz, ZOTAC GeForce 1070 Ti AMP Extreme, Samsung 970 EVO M.2 NVMe drives (1Tb & 500 Gb), Windows 10 Professional, Thrustmaster Warthog HOTAS, Thrustmaster Warthog Stick, Thrustmaster Cougar Throttle, Cougar MFDs x3, Saitek Combat Rudder Pedals and TrackIR 5. -={TAC}=-DCS Server Gigabyte GA-Z68XP-UD3, i7-3770K CPU @ 3.90GHz, 32GB G.SKILL Ripjaws DDR3 @ 1600Mhz, ZOTAC GeForce® GTX 970. Link to comment Share on other sites More sharing options...
Flightsimbob Posted March 3, 2019 Share Posted March 3, 2019 Helo Respawns Hi I'm relatively new to Moose. Apologies, I'm probably missing something really basic here, however I cannot get helicopters to respawn more than about 5 or 6 times - see the basic script below and attached miz file. To my inexperienced eye, I would expect there to always be 2 helicopters at any one time (with no overall mission limit). However, as you'll see after a short while (around 7 minutes), this eventually drops away to no helicopters. The equivalent script with ground units only works as expected. BlueHeloSpawn = SPAWN :New( "Tank" ) :InitLimit( 2, 0 ) :InitRandomizePosition( true, 200, 50 ) :InitRepeatOnLanding() :InitDelayOff() :InitCleanUp( 60 ) :SpawnScheduled( 5, .5 ) Any advice greatfully received. ThanksTest_Heli_Respawn.luaTest_Heli_Respawn.miz Link to comment Share on other sites More sharing options...
ElementLT Posted March 4, 2019 Share Posted March 4, 2019 (edited) Hi and good day! I think it may be your "InitLimit(2,0)" option. I believe the 2nd parameter is the MAX number of units you wish to have spawned. So if you set something up like InitLimit(2,20) - 2 will be spawned at the start but no more then 20 will be spawned. But on the other hand I do believe we also have a bug from our most recent DCS update. Something to do with events I believe. more on that here: https://forums.eagle.ru/showthread.php?p=3820282 hope this helps. :) Hi I'm relatively new to Moose. Apologies, I'm probably missing something really basic here, however I cannot get helicopters to respawn more than about 5 or 6 times - see the basic script below and attached miz file. To my inexperienced eye, I would expect there to always be 2 helicopters at any one time (with no overall mission limit). However, as you'll see after a short while (around 7 minutes), this eventually drops away to no helicopters. The equivalent script with ground units only works as expected. BlueHeloSpawn = SPAWN :New( "Tank" ) :InitLimit( 2, 0 ) :InitRandomizePosition( true, 200, 50 ) :InitRepeatOnLanding() :InitDelayOff() :InitCleanUp( 60 ) :SpawnScheduled( 5, .5 ) Any advice greatfully received. Thanks Edited March 4, 2019 by ElementLT Coming Soon... The Fraternity Returns : https://thefraternitysim.com/ Link to comment Share on other sites More sharing options...
Flightsimbob Posted March 4, 2019 Share Posted March 4, 2019 Hi and good day! I think it may be your "InitLimit(2,0)" option. I believe the 2nd parameter is the MAX number of units you wish to have spawned. So if you set something up like InitLimit(2,20) - 2 will be spawned at the start but no more then 20 will be spawned. But on the other hand I do believe we also have a bug from our most recent DCS update. Something to do with events I believe. more on that here: https://forums.eagle.ru/showthread.php?p=3820282 hope this helps. :) Thank-you much appreciated. Yeah, must the events bug (which I wasn’t aware of) which is the issue - that answers a lot! Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
Habu_69 Posted March 4, 2019 Share Posted March 4, 2019 (edited) From MOOSE docs: SPAWN.InitLimit. SPAWN has 2 kind of limits: The maximum amount of Wrapper.Units that can be alive at the same time... The maximum amount of Wrapper.Groups that can be spawned... This is more of a resource-type of limit. So :InitLimit( 2, 20 ) -- A max of 2 units can be alive in DCS and a new group will be spawned up to 20 times. Edited March 4, 2019 by Habu_69 Link to comment Share on other sites More sharing options...
FlightControl Posted March 7, 2019 Author Share Posted March 7, 2019 Guys sorry for the interruption, but there is something IMPORTANT For those running the DCS world version beta; make sure you do a ROLLBACK to the version 2.5.4.27430. The latest beta of DCS WORLD has severe issues with the event broadcasting system in the software. As a result; scripts won´t work properly, including MOOSE. Revert your DCS beta using DCS_Updater.exe update 2.5.4.27430, from the bin folder. Bug report to ED is to be found here: https://forums.eagle.ru/showthread.php?p=3820282#post3820282 Sorry for the inconvenience. Let's hope that ED is not publishing this beta to the official release version next week! FC [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE] Link to comment Share on other sites More sharing options...
Flightsimbob Posted March 7, 2019 Share Posted March 7, 2019 Guys sorry for the interruption, but there is something IMPORTANT For those running the DCS world version beta; make sure you do a ROLLBACK to the version 2.5.4.27430. The latest beta of DCS WORLD has severe issues with the event broadcasting system in the software. As a result; scripts won´t work properly, including MOOSE. Revert your DCS beta using DCS_Updater.exe update 2.5.4.27430, from the bin folder. Bug report to ED is to be found here: https://forums.eagle.ru/showthread.php?p=3820282#post3820282 Sorry for the inconvenience. Let's hope that ED is not publishing this beta to the official release version next week! FC Thanks FC Sent from my iPhone using Tapatalk Link to comment Share on other sites More sharing options...
SNAFU Posted March 8, 2019 Share Posted March 8, 2019 (edited) Hi, I previously used the function: A2ADispatcherRed1:SetSquadronCap( "ABK 1", RedCAPZone1, 1000, 15000, 600, 800, 800, 1200 ) with an older MOOSE version sucessfully, so only 1 Flight was airboren at a time. Last weekend I updated to the latest MOOSE Version and now the A2ADispatcher constantly spawns a stream of AI flights. This is all in the current stable environment and I only added the "RescueHelo" function in another part of the mission, besides nothing was changed. I guess it happend with the new MOOSE version something broke. Did anything change with MOOSE concerning the functions? Here the complete script I use related to MOOSE: --trigger.action.outText("Line "..string.format(debug.getinfo(1).currentline).." passed", 5) DetectionSetGroupRed = SET_GROUP:New() DetectionSetGroupRed:FilterPrefixes( {"RED_EWR"} ) DetectionSetGroupRed:FilterStart() DetectionRed = DETECTION_AREAS:New( DetectionSetGroupRed, 100000 ) local dice = math.random(1,100) --trigger.action.outText("Line "..string.format(debug.getinfo(1).currentline).." passed", 4000) if dice < 25 then RedCAPZone1 = ZONE_POLYGON:New( "RedCAPZone 1", GROUP:FindByName( "RedCAPZone 1" ) ) A2ADispatcherRed1 = AI_A2A_DISPATCHER:New( DetectionRed ) --A2ADispatcherRed1:SetTacticalDisplay( true ) A2ADispatcherRed1:SetSquadron( "ABK 1", "Gudauta", { "SQRed 1" } ) A2ADispatcherRed1:SetSquadronCap( "ABK 1", RedCAPZone1, 1000, 15000, 600, 800, 800, 1200 ) A2ADispatcherRed1:SetSquadronCapInterval( "ABK 1", 1, 60, 1800, 1 ) A2ADispatcherRed1:SetSquadronGrouping( "ABK 1", 2 ) A2ADispatcherRed1:SetSquadronGci( "ABK 1", 900, 1200 ) A2ADispatcherRed1:SetDefaultTakeoffFromParkingCold()--test elseif dice < 50 then RedCAPZone2 = ZONE_POLYGON:New( "RedCAPZone 2", GROUP:FindByName( "RedCAPZone 2" ) ) A2ADispatcherRed2 = AI_A2A_DISPATCHER:New( DetectionRed ) --A2ADispatcherRed3:SetTacticalDisplay( true ) A2ADispatcherRed2:SetSquadron( "ABK 2", "Sukhumi-Babushara", { "SQRed 2" } ) A2ADispatcherRed2:SetSquadronCap( "ABK 2", RedCAPZone2, 100, 1000, 300, 500, 300, 500 ) A2ADispatcherRed2:SetSquadronCapInterval( "ABK 2", 2, 60, 1200, 1 ) A2ADispatcherRed2:SetSquadronGrouping( "ABK 2", 2 ) A2ADispatcherRed2:SetSquadronGci( "ABK 2", 900, 1200 ) A2ADispatcherRed2:SetDefaultTakeoffFromParkingCold() elseif dice < 75 then RedCAPZone3 = ZONE_POLYGON:New( "RedCAPZone 3", GROUP:FindByName( "RedCAPZone 3" ) ) A2ADispatcherRed3 = AI_A2A_DISPATCHER:New( DetectionRed ) --A2ADispatcherRed4:SetTacticalDisplay( true ) A2ADispatcherRed3:SetSquadron( "RUS 1", "Sochi-Adler", { "SQRed 3" } ) A2ADispatcherRed3:SetSquadronCap( "RUS 1", RedCAPZone3, 1000, 15000, 600, 800, 800, 1200 ) A2ADispatcherRed3:SetSquadronCapInterval( "RUS 1", 1, 60, 3600, 1 ) A2ADispatcherRed3:SetSquadronGrouping( "RUS 1", 2 ) A2ADispatcherRed3:SetSquadronGci( "RUS 1", 900, 1200 ) A2ADispatcherRed3:SetDefaultTakeoffFromParkingCold() else RedCAPZone4 = ZONE_POLYGON:New( "RedCAPZone 4", GROUP:FindByName( "RedCAPZone 4" ) ) A2ADispatcherRed4 = AI_A2A_DISPATCHER:New( DetectionRed ) --A2ADispatcherRed5:SetTacticalDisplay( true ) A2ADispatcherRed4:SetSquadron( "RUS 2", "Mozdok", { "SQRed 4" } ) A2ADispatcherRed4:SetSquadronCap( "RUS 2", RedCAPZone4, 1000, 15000, 600, 800, 800, 1200 ) A2ADispatcherRed4:SetSquadronCapInterval( "RUS 2", 2, 60, 3600, 1 ) A2ADispatcherRed4:SetSquadronGrouping( "RUS 2", 2 ) A2ADispatcherRed4:SetSquadronGci( "RUS 2", 900, 1200 ) A2ADispatcherRed4:SetDefaultTakeoffFromParkingCold() end --+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ DetectionSetGroupBlue = SET_GROUP:New() DetectionSetGroupBlue:FilterPrefixes( {"Blue_EWR"} ) DetectionSetGroupBlue:FilterStart() DetectionBlue = DETECTION_AREAS:New( DetectionSetGroupBlue, 100000 ) local dice = math.random(1,100) if dice < 33 then BlueCAPZone1 = ZONE_POLYGON:New( "BlueCAPZone 1", GROUP:FindByName( "BlueCAPZone 1" ) ) A2ADispatcherBlue2 = AI_A2A_DISPATCHER:New( DetectionBlue ) --A2ADispatcherBlue2:SetTacticalDisplay( true ) A2ADispatcherBlue2:SetSquadron( "GEO 1", "Kobuleti", { "SQBlue 1" } ) A2ADispatcherBlue2:SetSquadronCap( "GEO 1", BlueCAPZone1, 5000, 15000, 600, 800, 800, 1200 ) A2ADispatcherBlue2:SetSquadronCapInterval( "GEO 1", 1, 60, 1800, 1 ) A2ADispatcherBlue2:SetSquadronGrouping( "GEO 1", 2 ) A2ADispatcherBlue2:SetSquadronGci( "GEO 1", 900, 1200 ) A2ADispatcherBlue2:SetDefaultTakeoffFromParkingCold()--test elseif dice < 66 then BlueCAPZone2 = ZONE_POLYGON:New( "BlueCAPZone 2", GROUP:FindByName( "BlueCAPZone 2" ) ) A2ADispatcherBlue2 = AI_A2A_DISPATCHER:New( DetectionBlue ) --A2ADispatcherBlue3:SetTacticalDisplay( true ) A2ADispatcherBlue2:SetSquadron( "GEO 2", "Batumi", { "SQBlue 2" } ) A2ADispatcherBlue2:SetSquadronCap( "GEO 2", BlueCAPZone2, 5000, 15000, 300, 500, 300, 500 ) A2ADispatcherBlue2:SetSquadronCapInterval( "GEO 2", 2, 60, 3600, 1 ) A2ADispatcherBlue2:SetSquadronGrouping( "GEO 2", 2 ) A2ADispatcherBlue2:SetSquadronGci( "GEO 2", 900, 1200 ) A2ADispatcherBlue2:SetDefaultTakeoffFromParkingCold() else BlueCAPZone3 = ZONE_POLYGON:New( "BlueCAPZone 3", GROUP:FindByName( "BlueCAPZone 3" ) ) A2ADispatcherBlue3 = AI_A2A_DISPATCHER:New( DetectionBlue ) --A2ADispatcherBlue4:SetTacticalDisplay( true ) A2ADispatcherBlue3:SetSquadron( "GEO 3", "Vaziani", { "SQBlue 3" } ) A2ADispatcherBlue3:SetSquadronCap( "GEO 3", BlueCAPZone3, 5000, 15000, 600, 800, 800, 1200 ) A2ADispatcherBlue3:SetSquadronCapInterval( "GEO 3", 1, 60, 3600, 1 ) A2ADispatcherBlue3:SetSquadronGrouping( "GEO 3", 2 ) A2ADispatcherBlue3:SetSquadronGci( "GEO 3", 900, 1200 ) A2ADispatcherBlue3:SetDefaultTakeoffFromParkingCold() end trigger.action.outText("Auto CAP initialized", 45) What I want to achive is to have 1 flight airborne, but now the dispatcher generates an endless stream of flights. Edited March 8, 2019 by SNAFU [sIGPIC][/sIGPIC] Unsere Facebook-Seite Link to comment Share on other sites More sharing options...
FlightControl Posted March 10, 2019 Author Share Posted March 10, 2019 SNAFU, can you drop me your mission on Discord in a PM? I'll have a look. Is such possible? But please first remove any mod from the mission okay? [TABLE][sIGPIC][/sIGPIC]| Join MOOSE community on: DISCORD :thumbup: Website of the MOOSE LUA Framework. MOOSE framework Downloads. Check out Example Missions to try out and learn. MOOSE YouTube Channel for live demonstrations and tutorials. [/TABLE] Link to comment Share on other sites More sharing options...
SkipperSMG Posted March 13, 2019 Share Posted March 13, 2019 (edited) Hey Guys, i started using MOOSE for my missions and took the next step and added the A2A_Dispatcher. Unfortunatly, i can't get my flights into the air. I tripple checked group and unit names and I am a bit lost right now :music_whistling:. I read about problems beeing introduced with the latest open beta version. So i tested the AID-A2A-100 - Demonstration mission in Github with the latest OB version of DCS and dev branch of MOOSE. So, the same setup as for my mission. And it works fine. I cant find the error/s in my mission. Maybe an additional pair of eyes can. Here's my script file. Thanks in advance. EDIT: I'd like to add, that all my other MOOSE based scripts work fine and the tactical situation display works. Units get detected but the CAP flights refuse to spawn. -- Caucasus_Hotline A2A_Dispatcher -- Define GROUP object with a collection of groups that contribute to the EWR network. DetectionSetGroup = SET_GROUP:New() DetectionSetGroup:FilterPrefixes( { "EW_NET_US_AWACS", "EW_NET_US_EWR", "USS" } ) DetectionSetGroup:FilterStart() Detection = DETECTION_AREAS:New( DetectionSetGroup, 140000 ) -- Setting up A2A dispatcher. A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) -- Enable the tactical display panel. A2ADispatcher:SetTacticalDisplay( true ) -- Setting up polygon border zone. US_BorderZone = ZONE_POLYGON:New( "US_Border", GROUP:FindByName( "US_Border" ) ) A2ADispatcher:SetBorderZone( US_BorderZone ) -- Setting up engagement radius A2ADispatcher:SetEngageRadius( 80000 ) -- Setting up the squadrons. A2ADispatcher:SetSquadron( "KutaisiF15", AIRBASE.Caucasus.Kutaisi, { "CAPKutaisiF15" }, 4 ) A2ADispatcher:SetSquadron( "KutaisiF16", AIRBASE.Caucasus.Kutaisi, { "CAPKutaisiF16" }, 4 ) A2ADispatcher:SetSquadron( "VazianiF16", AIRBASE.Caucasus.Vaziani, { "CAPVazianiF16" }, 4 ) A2ADispatcher:SetSquadron( "VazianiF15", AIRBASE.Caucasus.Vaziani, { "CAPVazianiF15" }, 4 ) A2ADispatcher:SetSquadron( "StennisF18", AIRBASE:FindByName("USS Stennis"), { "CAPStennisF18" }, 4 ) A2ADispatcher:SetSquadron( "StennisF14", AIRBASE:FindByName("USS Stennis"), { "CAPStennisF14" }, 4 ) A2ADispatcher:SetSquadron( "VinsonF18", AIRBASE:FindByName("USS Vinson"), { "CAPVinsonF18" }, 4 ) A2ADispatcher:SetSquadron( "VinsonF14", AIRBASE:FindByName("USS Vinson"), { "CAPVinsonF14" }, 4 ) -- Setting up the overhead A2ADispatcher:SetSquadronOverhead( "KutaisiF15", 1 ) A2ADispatcher:SetSquadronOverhead( "KutaisiF16", 1 ) A2ADispatcher:SetSquadronOverhead( "VazianiF16", 1 ) A2ADispatcher:SetSquadronOverhead( "VazianiF15", 1 ) A2ADispatcher:SetSquadronOverhead( "StennisF18", 1 ) A2ADispatcher:SetSquadronOverhead( "StennisF14", 1 ) A2ADispatcher:SetSquadronOverhead( "VinsonF18", 1 ) A2ADispatcher:SetSquadronOverhead( "VinsonF14", 1 ) -- Setting up the Grouping A2ADispatcher:SetSquadronGrouping( "KutaisiF15", 2 ) A2ADispatcher:SetSquadronGrouping( "KutaisiF16", 2 ) A2ADispatcher:SetSquadronGrouping( "VazianiF16", 2 ) A2ADispatcher:SetSquadronGrouping( "VazianiF15", 2 ) A2ADispatcher:SetSquadronGrouping( "StennisF18", 2 ) A2ADispatcher:SetSquadronGrouping( "StennisF14", 2 ) A2ADispatcher:SetSquadronGrouping( "VinsonF18", 2 ) A2ADispatcher:SetSquadronGrouping( "VinsonF14", 2 ) -- Setting up the Takeoff A2ADispatcher:SetSquadronTakeoffInAir( "KutaisiF15" ) A2ADispatcher:SetSquadronTakeoffInAir( "KutaisiF16" ) A2ADispatcher:SetSquadronTakeoffInAir( "VazianiF15" ) A2ADispatcher:SetSquadronTakeoffInAir( "StennisF18" ) A2ADispatcher:SetSquadronTakeoffFromRunway( "StennisF14" ) A2ADispatcher:SetSquadronTakeoffFromRunway( "VinsonF18" ) A2ADispatcher:SetSquadronTakeoffFromRunway( "VinsonF14" ) A2ADispatcher:SetSquadronTakeoffFromParkingCold( "VazianiF16" ) -- Setting up despawn upon landing A2ADispatcher:SetSquadronLandingAtEngineShutdown( "KutaisiF15" ) A2ADispatcher:SetSquadronLandingAtEngineShutdown( "KutaisiF16" ) A2ADispatcher:SetSquadronLandingAtEngineShutdown( "VazianiF16" ) A2ADispatcher:SetSquadronLandingAtEngineShutdown( "VazianiF15" ) A2ADispatcher:SetSquadronLanding( "StennisF18" ) A2ADispatcher:SetSquadronLanding( "StennisF14" ) A2ADispatcher:SetSquadronLanding( "VinsonF18" ) A2ADispatcher:SetSquadronLanding( "VinsonF14" ) -- CAP execution. CAPZoneNorthwest = ZONE_POLYGON:New( "USCAPZoneNorthwest", GROUP:FindByName( "USCAPZoneNorthwest" ) ) A2ADispatcher:SetSquadronCap( "StennisF18", CAPZoneNorthwest, 4000, 35000, 600, 800, 800, 1200, "BARO" ) A2ADispatcher:SetSquadronCapInterval( "StennisF18", 1, 30, 180, 1 ) A2ADispatcher:SetSquadronCap( "StennisF14", CAPZoneNorthwest, 4000, 35000, 600, 800, 800, 1200, "BARO" ) A2ADispatcher:SetSquadronCapInterval( "StennisF14", 1, 30, 180, 1 ) CAPZoneWest = ZONE_POLYGON:New( "USCAPZoneWest", GROUP:FindByName( "USCAPZoneWest" ) ) A2ADispatcher:SetSquadronCap( "VinsonF18", CAPZoneWest, 4000, 35000, 600, 800, 800, 1200, "BARO" ) A2ADispatcher:SetSquadronCapInterval( "VinsonF18", 1, 30, 180, 1 ) A2ADispatcher:SetSquadronCap( "VinsonF14", CAPZoneWest, 4000, 35000, 600, 800, 800, 1200, "BARO" ) A2ADispatcher:SetSquadronCapInterval( "VinsonF14", 1, 30, 180, 1 ) CAPZoneSouthwest = ZONE_POLYGON:New( "USCAPZoneSouthwest", GROUP:FindByName( "USCAPZoneSouthwest" ) ) A2ADispatcher:SetSquadronCap( "KutaisiF15", CAPZoneSouthwest, 4000, 35000, 600, 800, 800, 1200, "BARO" ) A2ADispatcher:SetSquadronCapInterval( "KutaisiF15", 2, 30, 180, 1 ) CAPZoneSouth = ZONE_POLYGON:New( "USCAPZoneSouth", GROUP:FindByName( "USCAPZoneSouth" ) ) A2ADispatcher:SetSquadronCap( "KutaisiF16", CAPZoneSouth, 4000, 35000, 600, 800, 800, 1200, "BARO" ) A2ADispatcher:SetSquadronCapInterval( "KutaisiF16", 2, 30, 180, 1 ) CAPZoneSoutheast = ZONE_POLYGON:New( "USCAPZoneSoutheast", GROUP:FindByName( "USCAPZoneSoutheast" ) ) A2ADispatcher:SetSquadronCap( "VazianiF16", CAPZoneSoutheast, 4000, 35000, 600, 800, 800, 1200, "BARO" ) A2ADispatcher:SetSquadronCapInterval( "VazianiF16", 1, 30, 180, 1 ) A2ADispatcher:SetSquadronCap( "VazianiF15", CAPZoneSoutheast, 4000, 35000, 600, 800, 800, 1200, "BARO" ) A2ADispatcher:SetSquadronCapInterval( "VazianiF15", 1, 30, 180, 1 ) -- Set squadron tanker A2ADispatcher:SetSquadronRefuelThreshold( "KutaisiF15", 0.30 ) A2ADispatcher:SetSquadronRefuelThreshold( "KutaisiF16", 0.30 ) A2ADispatcher:SetSquadronRefuelThreshold( "VazianiF16", 0.30 ) A2ADispatcher:SetSquadronRefuelThreshold( "VazianiF15", 0.30 ) A2ADispatcher:SetSquadronRefuelThreshold( "StennisF18", 0.30 ) A2ADispatcher:SetSquadronRefuelThreshold( "StennisF14", 0.30 ) A2ADispatcher:SetSquadronRefuelThreshold( "VinsonF18", 0.30 ) A2ADispatcher:SetSquadronRefuelThreshold( "VinsonF14", 0.30 ) A2ADispatcher:SetSquadronTanker( "KutaisiF15", "KC135Texaco_Land" ) A2ADispatcher:SetSquadronTanker( "KutaisiF16", "KC135Texaco_Land" ) A2ADispatcher:SetSquadronTanker( "StennisF18", "KC135MPRS_Texaco_Sea" ) A2ADispatcher:SetSquadronTanker( "StennisF14", "KC135MPRS_Texaco_Sea" ) A2ADispatcher:SetSquadronTanker( "VinsonF18", "KC135MPRS_Arco_Sea" ) Edited March 13, 2019 by SkipperSMG i5-2400 | 16GB Corsair XMS3 | MSI GTX 970 4GB | 500GB Samsung 850 Evo | TrackIR 5 | TM Warthog | Saitek Rudder Pedals | Windows 10 64 bit [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Recommended Posts