Habu_69 Posted April 8, 2019 Share Posted April 8, 2019 Seems you could use an EVENT.OnLanding method, then Destroy() the unit. Link to comment Share on other sites More sharing options...
Mano Posted April 8, 2019 Share Posted April 8, 2019 Seems you could use an EVENT.OnLanding method, then Destroy() the unit.Thank you but how to do that without having the ai actually land the plane? It seems to me that the destroy command doesn't work because it doesn't point to the spawned Group. Indeed when I call the spawn, the game automatically rename each group with #nnn suffix and I don't understand if the script is then able to find it. Inviato dal mio SM-G928F utilizzando Tapatalk [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Itzo Posted April 8, 2019 Share Posted April 8, 2019 Save the spawned group in a global variable, then the Destroy() works as it knows it's "name". Should work! i.e. Group1 = SPAWN:New( "GRP1-1" ):InitKeepUnitNames():Spawn() Group1:Destroy() DCS World 2.5.x | F-14 | F/A-18C | AV-8B | AJS-37 | A10C | M-2000C | F-15C | MiG-21 | Hawk | FW190 | BF109K | Spitfire Mk. IX | P-51D | Gazelle | UH-1H | MI-8 | BS | CA | Persian Gulf | Normandy | NTTR Win10-x64 | ASUS Strix Z270H Gaming | Intel i7-7700K | Gigabyte GeForce GTX 1080 Ti Gaming OC | Corsair Vengeance LPX 32 GB DDR4 | SSD Samsung 850 | TM Hotas Warthog | Saitek Pro Flight Pedals | Oculus Rift CV1 Link to comment Share on other sites More sharing options...
Itzo Posted April 8, 2019 Share Posted April 8, 2019 (edited) I’m struggling with the same issue. It would be convenient if spawned aircraft could be made to disappear on landing or parking by a command :VanishOnLand() or :VanishOnEngineShutdown() I use the landing event as follows: _USAFAGGRESSORS = 1 _USA = 2 air1:HandleEvent(EVENTS.Land) function air1:OnEventLand(EventData) if EventData.IniUnit:GetCoalition() == _USAFAGGRESSORS then Unit.destroy(EventData.IniDCSUnit) trigger.action.outText("Enemy landed", 10) end end air2:HandleEvent(EVENTS.Land) function air2:OnEventLand(EventData) if EventData.IniUnit:GetCoalition() == _USAFAGGRESSORS then Unit.destroy(EventData.IniDCSUnit) trigger.action.outText("Enemy landed", 10) end end If the coalition in this case is red (0 = neutral, 1 = red, 2 = blue), the unit will despawn on landing keeping it clear :) 'air1' is the globally saved spawned group. Edited April 8, 2019 by Itzo correction DCS World 2.5.x | F-14 | F/A-18C | AV-8B | AJS-37 | A10C | M-2000C | F-15C | MiG-21 | Hawk | FW190 | BF109K | Spitfire Mk. IX | P-51D | Gazelle | UH-1H | MI-8 | BS | CA | Persian Gulf | Normandy | NTTR Win10-x64 | ASUS Strix Z270H Gaming | Intel i7-7700K | Gigabyte GeForce GTX 1080 Ti Gaming OC | Corsair Vengeance LPX 32 GB DDR4 | SSD Samsung 850 | TM Hotas Warthog | Saitek Pro Flight Pedals | Oculus Rift CV1 Link to comment Share on other sites More sharing options...
Sierra99 Posted April 10, 2019 Share Posted April 10, 2019 (edited) Morning Gents, New challenge...When the line 44 is enabled in the attached script: A2ADispatcher:SetSquadron( "Jask", AIRBASE.PersianGulf.Bandar-e-Jask_airfield, { "F-4E-1", "F-4E-2", "F-4E-3" }, 24 ) The script fails and generates the following the DCS Log File error: 2019-04-10 15:00:42.821 ERROR DCS: Mission script error: : [string "C:\Users\Gary\AppData\Local\Temp\DCS.openbeta\/~mis00006FA2.lua"]:44: attempt to perform arithmetic on field 'Bandar' (a nil value) stack traceback: [C]: ? [string "C:\Users\Gary\AppData\Local\Temp\DCS.openbeta\/~mis00006FA2.lua"]:44: in main chunk Commenting out line 44 allows the script to work as intended. I can place 2 F-4s on the Ramp and it will start Taxi and Take offTAC_Persian_Gulf_4.2019.miz[TAC-PG]_V1.0 TEST.luaJask Error.rar Edited April 10, 2019 by Sierra99 [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...
S D Posted April 10, 2019 Share Posted April 10, 2019 Check the airfield name, i believe it should be A2ADispatcher:SetSquadron( "Jask", AIRBASE.PersianGulf.Bandar_e_Jask_airfield, { "F-4E-1", "F-4E-2", "F-4E-3" }, 24 ) I know its listed as you put it in Moose.lua, but its not correct afaik. Corrected list (although there will be more with todays update). --- These are all airbases of the Persion Gulf Map: -- -- * AIRBASE.PersianGulf.Abu_Musa_Island_Airport -- * AIRBASE.PersianGulf.Bandar_Abbas_Intl -- * AIRBASE.PersianGulf.Bandar_Lengeh -- * AIRBASE.PersianGulf.Al_Dhafra_AB -- * AIRBASE.PersianGulf.Dubai_Intl -- * AIRBASE.PersianGulf.Al_Maktoum_Intl -- * AIRBASE.PersianGulf.Fujairah_Intl -- * AIRBASE.PersianGulf.Tunb_Island_AFB -- * AIRBASE.PersianGulf.Havadarya -- * AIRBASE.PersianGulf.Khasab -- * AIRBASE.PersianGulf.Lar_Airbase -- * AIRBASE.PersianGulf.Al_Minhad_AB -- * AIRBASE.PersianGulf.Qeshm_Island -- * AIRBASE.PersianGulf.Sharjah_Intl -- * AIRBASE.PersianGulf.Sirri_Island -- * AIRBASE.PersianGulf.Tunb_Kochak -- * AIRBASE.PersianGulf.Sir_Abu_Nuayr -- * AIRBASE.PersianGulf.Kerman_Airport -- * AIRBASE.PersianGulf.Shiraz_International_Airport -- * AIRBASE.PersianGulf.Sas_Al_Nakheel_Airport -- * AIRBASE.PersianGulf.Bandar_e_Jask_airfield -- * AIRBASE.PersianGulf.Abu_Dhabi_International_Airport -- * AIRBASE.PersianGulf.Al_Bateen_Airport -- * AIRBASE.PersianGulf.Kish_International_Airport -- * AIRBASE.PersianGulf.Al_Ain_International_Airport -- * AIRBASE.PersianGulf.Lavan_Island_Airport -- * AIRBASE.PersianGulf.Jiroft_Airport -- @field PersianGulf Link to comment Share on other sites More sharing options...
A101Wayz Posted April 10, 2019 Share Posted April 10, 2019 At a quick glance, I would say that it should read: "Bandar_e_Jask"... the interpreter is seeing the dashes a minus signs. 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 April 10, 2019 Share Posted April 10, 2019 Corrected list (although there will be more with todays update DCS update? Moose Update? Or both? I figured it was a DCS error since I copied the line above that works and only changed the name but I have no clue how to check that in DCS. Thanks for the help. [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...
S D Posted April 10, 2019 Share Posted April 10, 2019 The list posted in the spoiler is the current airbase list in Moose. The DCS update today adds more airfields to the PG, so these will need to be added into Moose, best to wait a couple of days, it'll get done soon. Link to comment Share on other sites More sharing options...
funkyfranky Posted April 10, 2019 Share Posted April 10, 2019 Airbases in MOOSE Guys, I have the impression that there is sometimes a little confusion about the airbases that are "supported" by MOOSE. So to explain briefly: MOOSE retrieves all airbases of the map from the DCS API function getAirbases at the start of the mission. This includes also all FARPS and ships. Also those that are spawned. For the airdromes, there are additionally "enumerators". These are added by hand to the Moose.lua and need to be updated as new airbases or even maps are added to DCS. However, the sole purpose of these enumerators is that they avoid typos when using the LDT intellisense. For example, the enumerator AIRBASE.Caucasus.Senaki_Kolkhi is the same as the string "Senaki-Kolkhi". Therefore the two lines AIRBASE:FindByName(AIRBASE.Caucasus.Senaki_Kolkhi) AIRBASE:FindByName("Senaki-Kolkhi") are absolutely equivalent. So if a new airbase is added in DCS and there is no enumerator in MOOSE (yet), you can always use the simple string. Only make sure that you use the exact same spelling as you find on the map in the mission editor (including blanks and dashes, these are allowed in strings but not in variable names). A warrior's mission is to foster the success of others. i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2 RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss Link to comment Share on other sites More sharing options...
Hardcard Posted April 11, 2019 Share Posted April 11, 2019 (edited) It seems to me that the destroy command doesn't work because it doesn't point to the spawned Group. Indeed when I call the spawn, the game automatically rename each group with #nnn suffix and I don't understand if the script is then able to find it. Your diagnosis is correct, the script can't find the spawned groups because their names don't match. When dealing with spawned groups in MOOSE, don't use :FindByName(), since that'll target the late activated group templates in ME, not the spawned groups themselves. If you want to work with the spawned objects, there are several options available. You can either try the solution that Itzo proposed or you could do the following: SPAWNSET = SET_GROUP:New() -- Create a set which will include the relevant spawned objects in the mission :FilterPrefixes("GRP1-", "GRP2-") -- Set up a filter to target the specific spawned objects which use "GRP1-" and "GRP2-" as prefixes in their ME group name :FilterStart() -- Store the spawn objects in separate variables MIG21 = SPAWN:New( "GRP1-1" ) TU160 = SPAWN:New( "GRP1-2" ) MIG29 = SPAWN:New( "GRP1-3" ) F15 = SPAWN:New( "GRP2-1" ) local function SpawnScenario(scenarioID) SPAWNSET:FilterStart() -- You can add this line to make sure that the set is "refreshed" every time you call the function via F10 menu SPAWNSET:ForEachGroupAlive( -- This iterator will destroy all active groups included in the set function(SpawnGroup) SpawnGroup:Destroy() end ) -- Then spawn the late activated groups depending on scenarioID, same as before if scenarioID == 1 then MIG21:Spawn() TU160:Spawn() MIG29:Spawn() end if scenarioID == 2 then F15:Spawn() end end MenuCoalitionBlue = MENU_COALITION:New( coalition.side.BLUE, "Spawning Scenario" ) MenuCoalitionCommand = MENU_COALITION_COMMAND:New( coalition.side.BLUE, "Scenario 1", MenuCoalitionBlue,SpawnScenario, 1) MenuCoalitionCommand = MENU_COALITION_COMMAND:New( coalition.side.BLUE, "Scenario 2", MenuCoalitionBlue,SpawnScenario, 2) MenuCoalitionCommand = MENU_COALITION_COMMAND:New( coalition.side.BLUE, "Scenario 3", MenuCoalitionBlue,SpawnScenario, 3) Edited April 11, 2019 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Mano Posted April 11, 2019 Share Posted April 11, 2019 Thank you Hardcard and Itzo. @Itzo: your solution works but at the time when I can call the variable:destroy() I don't have created it yet so it can't work. @Hardcard: your solution works well, however it seems that the iterator "ForEachGroupAlive" works only for the first item indicated in the prefixes set. In the case of the example: - scenario 1 spawns GRP1-... - scenario 2 spawns GRP2-... and clears GRP1-... items - if I click again scenario 1, GRP1-... alive are destroyed, but GRP2-... is still alive - if I click again scenario 2, GRP1-... are destroyed and GRP2-... stays alive and a new instance of GRP2-... is created Same thing if I add other "scenarios" and groups. The function(SpawnGroup)...destroy works only on the first group called in the prefixes array. (tests changing the order of the items in the array confirm this theory). [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Hardcard Posted April 12, 2019 Share Posted April 12, 2019 (edited) @Mano I might have made a silly mistake, sorry... Try replacing the SET declaration: SPAWNSET = SET_GROUP:New() :FilterPrefixes("GRP1-", "GRP2-") :FilterStart() With this one: SPAWNSET = SET_GROUP:New() :FilterPrefixes({"GRP1-", "GRP2-"}) :FilterStart() If it still doesn't work, try this one: SPAWNSET = SET_GROUP:New() :FilterPrefixes("GRP1-") :FilterPrefixes("GRP2-") :FilterStart() If it still resists, try this: -- Store the spawn objects in separate variables MIG21 = SPAWN:New( "GRP1-1" ) TU160 = SPAWN:New( "GRP1-2" ) MIG29 = SPAWN:New( "GRP1-3" ) F15 = SPAWN:New( "GRP2-1" ) local function SpawnScenario(scenarioID) SPAWNSET = SET_GROUP:New() -- Option A :FilterPrefixes({"GRP1-", "GRP2-"}) :FilterStart() -- or SPAWNSET = SET_GROUP:New() -- Option B :FilterPrefixes("GRP1-") :FilterPrefixes("GRP2-") :FilterStart() SPAWNSET:ForEachGroupAlive( -- This iterator will destroy all active groups included in the set function(SpawnGroup) SpawnGroup:Destroy() end ) -- Then spawn the late activated groups depending on scenarioID, same as before if scenarioID == 1 then MIG21:Spawn() TU160:Spawn() MIG29:Spawn() end if scenarioID == 2 then F15:Spawn() end end MenuCoalitionBlue = MENU_COALITION:New( coalition.side.BLUE, "Spawning Scenario" ) MenuCoalitionCommand = MENU_COALITION_COMMAND:New( coalition.side.BLUE, "Scenario 1", MenuCoalitionBlue,SpawnScenario, 1) MenuCoalitionCommand = MENU_COALITION_COMMAND:New( coalition.side.BLUE, "Scenario 2", MenuCoalitionBlue,SpawnScenario, 2) MenuCoalitionCommand = MENU_COALITION_COMMAND:New( coalition.side.BLUE, "Scenario 3", MenuCoalitionBlue,SpawnScenario, 3) Edited April 12, 2019 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Sierra99 Posted April 12, 2019 Share Posted April 12, 2019 (edited) Morning DCS! I have Two questions... First, can someone shed some light on values Following Sochi in this example? A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) The example in Moose explains what they are "for" but not exactly what each does... -- The @{#AI_A2A_DISPATCHER.SetSquadronCapInterval}() method specifies **how much** and **when** CAP flights will takeoff. -- -- It is recommended not to overload the air defense with CAP flights, as these will decrease the performance of the overall system. -- -- For example, the following setup will create a CAP for squadron "Sochi": -- -- A2ADispatcher:SetSquadronCap( "Sochi", CAPZoneWest, 4000, 8000, 600, 800, 800, 1200, "BARO" ) -- A2ADispatcher:SetSquadronCapInterval( "Sochi", 2, 30, 120, 1 ) Next Question...If I want two versions of the AI_A2A_DISPATCHER script to run concurrently do I change each instance of the following in each script as shown? A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) to A2ADispatcherRed = AI_A2A_DISPATCHER:New( Detection ) A2ADispatcherBlue = AI_A2A_DISPATCHER:New( Detection ) Thanks in advance Edited April 12, 2019 by Sierra99 [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...
Hardcard Posted April 12, 2019 Share Posted April 12, 2019 (edited) @Sierra99 Careful with the syntax, A2ADispatcher: isn't a class, AI_A2A_DISPATCHER: is. Here's the parameter info according to intellisense: AI_A2A_DISPATCHER:SetSquadronCapInterval(SquadronName,CapLimit,LowInterval,HighInterval,Probability) Were you asking for this? https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/AI.AI_A2A_Dispatcher.html##(AI_A2A_DISPATCHER).SetSquadronCapInterval Edited April 12, 2019 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Sierra99 Posted April 12, 2019 Share Posted April 12, 2019 (edited) @Sierra99 Careful with the syntax, A2ADispatcher: isn't a class, AI_A2A_DISPATCHER: is. Here's the parameter info according to intellisense: AI_A2A_DISPATCHER:SetSquadronCapInterval(SquadronName,CapLimit,LowInterval,HighInterval,Probability) Were you asking for this? https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/AI.AI_A2A_Dispatcher.html##(AI_A2A_DISPATCHER).SetSquadronCapInterval You answered the interval question. Thank you The Second, yes I know I have to be careful. I am using:Module AI.AI_A2A_Dispatcher “One AI_A2A_DISPATCHER object can create a defense system for one coalition, which is blue or red. If you want to create a mutual defense system, for both blue and red, then you need to create two AI_A2A_DISPATCHER objects, each governing their defense system.” I guess the question is What constitutes creating a second AI_A2A_DISPATCHER object? PS I thought I attached both lua files to the original post but apparently I failed at basic file management. I can post them later if it will help. PPS And I Discovered BOTH scripts are working correctly. Map settings were preventing me from seeing RAD aircraft spawn. Edited April 13, 2019 by Sierra99 [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...
Mano Posted April 12, 2019 Share Posted April 12, 2019 Thank you Hardcard for your help. Actually I did try only the first solution adding the { } brackets. It kinda worked but only for 2 GRPs. If I added a third group it didn't work properly. So, as I should've done before, I've looked at the docs and found that FilterPrefixes only accepts a string type. I modified the filter to check only for the "GRP" text (at this moment the numbers are only for spawning identification: SPAWNSET = SET_GROUP:New() :FilterPrefixes("GRP") :FilterStart() MIG21 = SPAWN:New("GRP1-1") TU160 = SPAWN:New("GRP1-2") MIG29 = SPAWN:New("GRP1-3") F15C = SPAWN:New("GRP2-1") F18 = SPAWN:New("GRP3-1") Now it works! thank you again Hardcard for your help without which I couldn't get to the solution. [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Hardcard Posted April 13, 2019 Share Posted April 13, 2019 (edited) I did try only the first solution adding the { } brackets. It kinda worked but only for 2 GRPs. If I added a third group it didn't work properly. That's weird :huh: Did you do it like this? SPAWNSET = SET_GROUP:New() :FilterPrefixes({"GRP1-", "GRP2-", "GRP3-"}) :FilterStart() So, as I should've done before, I've looked at the docs and found that FilterPrefixes only accepts a string type. Yes, the values must be given as strings but, afaik, this --> "GRP1-" is as valid a string as this --> "GRP". I think that numbers and dashes can be included in strings without a problem. SPAWNSET = SET_GROUP:New() :FilterPrefixes("GRP") :FilterStart() Yup, that was the easiest solution. I didn't mention it because I assumed you had other groups named "GRP..." in your mission, which you didn't want included in the set. Anyway, glad you got it working in the end :thumbup: Edited April 13, 2019 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Sierra99 Posted April 13, 2019 Share Posted April 13, 2019 Guys, I have the impression that there is sometimes a little confusion about the airbases that are "supported" by MOOSE. So to explain briefly: MOOSE retrieves all airbases of the map from the DCS API function getAirbases at the start of the mission. This includes also all FARPS and ships. Also those that are spawned. For example, the enumerator AIRBASE.Caucasus.Senaki_Kolkhi is the same as the string "Senaki-Kolkhi". Therefore the two lines AIRBASE:FindByName(AIRBASE.Caucasus.Senaki_Kolkhi) AIRBASE:FindByName("Senaki-Kolkhi") are absolutely equivalent. Sooooo...Does this mean AI_A2A_DISPATCHER can use a Carrier as a base for CAP flights? If so how would I add that. [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...
Hardcard Posted April 14, 2019 Share Posted April 14, 2019 @Sierra99 Try using the unit name of the carrier AIRBASE:FindByName("Unit name of the carrier in ME") [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
TLTeo Posted April 14, 2019 Share Posted April 14, 2019 Hello! I'm trying to install Moose to make a few missions, but I feel like I'm either misreading something or the documentation has not been updated. I've been trying to follow this guide: https://flightcontrol-master.github.io/MOOSE_DOCS/Moose_Setup_Guide.html but when I setup the framework in Eclipse the folder structure is completely different from that of the files I've downloaded and extracted. This is what the guide shows: And this is what the .zip contains: So what ends up happening is that there is no "Moose Mission Setup" folder as mentioned in part 6.2, so I have no idea where to go to import and run the Moose.lua script in DCS. Did I miss something obvious? Thanks! Link to comment Share on other sites More sharing options...
Sierra99 Posted April 15, 2019 Share Posted April 15, 2019 Try using the unit name of the carrier AIRBASE:FindByName("Unit name of the carrier in ME") That didn't work...It's throwing the following error: 2019-04-15 03:13:10.215 ERROR DCS: Mission script error: : [string "C:\Users\Gary\AppData\Local\Temp\DCS.openbeta\/~mis000015D3.lua"]:103126: attempt to index field 'Airbase' (a nil value) stack traceback: [C]: ? [string "C:\Users\Gary\AppData\Local\Temp\DCS.openbeta\/~mis000015D3.lua"]:103126: in function 'SetSquadron' [string "C:\Users\Gary\AppData\Local\Temp\DCS.openbeta\/~mis00004587.lua"]:27: in main chunk Here is the Script -- Date Created: 14 April 2019 -- Define a SET_GROUP object that builds a collection of groups that define the EWR network. DetectionSetGroup = SET_GROUP:New() DetectionSetGroup:FilterPrefixes( { "E2D" } ) DetectionSetGroup:FilterStart() Detection = DETECTION_AREAS:New( DetectionSetGroup, 30000 ) -- Setup the A2A dispatcher, and initialize it. A2ADispatcher = AI_A2A_DISPATCHER:New( Detection ) -- Enable the tactical display panel. A2ADispatcher:SetTacticalDisplay( true ) -- Any enemy crossing this border will be engaged. CVNBorderZone = ZONE_POLYGON:New( "CVN Border", GROUP:FindByName( "CVN Border" ) ) A2ADispatcher:SetBorderZone( CVNBorderZone ) A2ADispatcher:SetEngageRadius( 80000 ) -- Setup the squadrons. (LINE 27) (LINE 27) A2ADispatcher:SetSquadron( "Stennis",AIRBASE:FindByName( "USS STENNIS" ), { "ALERT 5" }, 20 ) -- Setup the overhead A2ADispatcher:SetSquadronOverhead( "Stennis", 1.2 ) -- Setup the Grouping A2ADispatcher:SetSquadronGrouping( "Stennis", 1 ) -- Setup the Takeoff methods A2ADispatcher:SetSquadronTakeoffFromRunway( "Stennis" ) -- Setup the Landing methods A2ADispatcher:SetSquadronLandingAtRunway( "Stennis" ) -- GCI Squadron execution. A2ADispatcher:SetSquadronGci( "Stennis", 900, 1200 )OTT.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...
Hardcard Posted April 15, 2019 Share Posted April 15, 2019 @TLTeo Follow the instructions given in (it shows an older MOOSE version, but the procedure is the same). You'll find the latest MOOSE release here (the source code is required to set up LDT, Moose.lua is the file you'll be including in your DCS missions) [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Hardcard Posted April 15, 2019 Share Posted April 15, 2019 (edited) @Sierra99 According to intellisense and the documentation, the second parameter in :SetSquadron() must be a string (the airbase name) rather than the object. Checking the MOOSE declaration, I've seen that MOOSE automatically runs AIRBASE:FindByName() for you, with the given string parameter. So, instead of this: A2ADispatcher:SetSquadron( "Stennis",AIRBASE:FindByName( "USS STENNIS" ), { "ALERT 5" }, 20 ) Try this: A2ADispatcher:SetSquadron( "Stennis","unit name of the carrier in ME", { "ALERT 5" }, 20 ) Edited April 15, 2019 by Hardcard [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Sierra99 Posted April 15, 2019 Share Posted April 15, 2019 @Sierra99 According to intellisense and the documentation, the second parameter in :SetSquadron() must be a string (the airbase name) rather than the object. Checking the MOOSE declaration, I've seen that MOOSE automatically runs AIRBASE:FindByName() for you, with the given string parameter. So, instead of this: A2ADispatcher:SetSquadron( "Stennis",AIRBASE:FindByName( "USS STENNIS" ), { "ALERT 5" }, 20 ) Try this: A2ADispatcher:SetSquadron( "Stennis","unit name of the carrier in ME", { "ALERT 5" }, 20 ) I'll give it a shot in the morning... If it works, it would make for some interesting missions...Thanks for the help [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...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now