MasterZelgadis Posted July 9, 2024 Posted July 9, 2024 1 hour ago, Amarok_73 said: Try this one: MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", 25, "End of Mission"):ToAll() The order of parameters is different than used in your script. https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Message.html##(MESSAGE).New Thank you!! That's it 22 minutes ago, Wingthor said: Did you use this example: https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Message.html##(MESSAGE).ToAll I seems example code might be wrong? Ill pass issue the Moose team. Sorry for unconvinience. Yep, that's the one I used "Sieh nur, wie majestätisch du durch die Luft segelst. Wie ein Adler. Ein fetter Adler." http://www.space-view.net
Wingthor Posted July 9, 2024 Posted July 9, 2024 8 hours ago, MasterZelgadis said: Thank you!! That's it Yep, that's the one I used Fixed... https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Message.html#%23(MESSAGE).ToAll 3 Moose framework contributor Moose scripting an DCS mission developer
MasterZelgadis Posted July 12, 2024 Posted July 12, 2024 Maybe another issue, or I'm doing it wrong. I want to create a BRA call, using: PlayerCoord = PlayerGroup:GetCoordinate() TargetCoord = IncidentGroup:GetCoordinate() bra = TargetCoord:ToStringBRA(PlayerCoord, nil, false) In my settings I use the imperial system, but the call is giving me kilometers for range and meters for altitude.. Is metric standard for this function and I have to give it a settings object where I set it to imperial? "Sieh nur, wie majestätisch du durch die Luft segelst. Wie ein Adler. Ein fetter Adler." http://www.space-view.net
Amarok_73 Posted July 12, 2024 Posted July 12, 2024 (edited) @MasterZelgadis Get a grip with _SETTINGS class, then set defaults as required. https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Settings.html Edited July 12, 2024 by Amarok_73 Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
MasterZelgadis Posted July 12, 2024 Posted July 12, 2024 (edited) 52 minutes ago, Amarok_73 said: @MasterZelgadis Get a grip with _SETTINGS class, then set defaults as required. https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Core.Settings.html Ah yes, with _SETTINGS it works. But weird nonetheless that Standard isn't what I set in the game settings Now I have to decide whether I like the ToStringBRA or ToStringBRAANATO more Edited July 12, 2024 by MasterZelgadis "Sieh nur, wie majestätisch du durch die Luft segelst. Wie ein Adler. Ein fetter Adler." http://www.space-view.net
Amarok_73 Posted July 12, 2024 Posted July 12, 2024 They're independent. Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
Apple Posted December 23, 2024 Posted December 23, 2024 **Late 2024 Xmas Release!** Welcome to the end of 2024 Holidays! This release contains functionality from both the master and the development branches in the attached .zip and .tar.gz files. This release covers the latest 150 or so changes in Moose, and closes the year for the team from Moose. Thanks to all contributors, discussion partners, bug finders and fixers to keep this project alive! Special thanks to @funkyfranky, @kaltokri, @shaji_dev/heartbreaker and @Statua! **AIRBASE** * Updated airbase enumerator for several new maps and added airbases (Kola, Syria, Afghanistan, Iraq). **AIRBOSS** * Changed landing event to runway touch in line with ED event changes. **ATC_GROUND** * Fixed an issue kicking players for speeding w/o prior warnings. **ATIS** * Added new soundfiles * Added support of new fog options **AUFTRAG** * Added options for a holding point for airplane missions * Improved handling of ingress-coordinate * Addesd speed options to holding, ingress, and egress options **AWACS** * Added option to extend mission range beyond the default of 100nm. * Added function to use-customize creation of call signs for players. **CTLD** * Added distance option for Hercules and Chinook unloads behind the unit, for the Chinook also for hover unloads. * Fixed a possible table key collision when extracting troops, based on a distance key duplication which could lead to leave alive groups behind and in the helo at the same time. * Added `GetLoadedCargo(Unit)` **CSAR** * Fixed naming of radio beacons. **EVENT** * Fix a couple of events where the DCS object sometimes does not have an getName() function attached. * Set `Event.IniGroupName` from the database in case group does not exist any more. **GROUP** * Added `Teleport(Coordinate)` function leveraging `Respawn()`. Now also translates routes if there are any. **OPSGROUP** * `AUFTRAG` Fixed speed unit conversion in multiple AUFTRAG types (DCS task parameter speed should be in m/s) * `OPSGROUP`: Fixed unit conversion for engage target speed * Improved respawn-behaviour, esp. for ships (teleport Auftrag options) * Set destination base to airwing base for flight groups * Restored setting of home, destination and current base in OPSGROUP * Fixed bug if no airbase associated with airwing in check rescuehelo * Added check that cohort names are unique * Removed InitWaypoints function from FLIGHTGROUP (obsolete) **PLAYERTASKMANAGER** * Added Constructor `PLAYERTASK:NewFromTarget` that determines task type based on the target object * Added `PLAYERTASK:_GetTaskTypeForTarget` to get the task type based on target description * Added `PLAYERTASKCONTROLLER.Scores` for RECON, ESCORT and CAP * Added `PLAYERTASK:AddStaticObjectSuccessCondition` task success condition for dead STATIC, SET_STATIC, SCENERY or SET_SCENERY targets * Added `PLAYERTASK:AddReconSuccessCondition` for AUFTRAG.Type.RECON tasks for when a client is at a certain LOS distance from the target * Added New Capture OpsZone PlayerTask with `OPSZONE` and `SET_OPSZONE` targets * Added Task "Time Limit" failure condition `PLAYERTASK:AddTimeLimitFailureCondition(TimeLimit)` * Added `PLAYERTASK:AddOpsZoneCaptureSuccessCondition(CaptureSquadGroupNamePrefix, Coalition)` * Added `PLAYERTASK:_CheckCaptureOpsZoneSuccess` **WAREHOUSE** * Fix for incorrect plane attribute ... and many, many more small additions and bug fixes as usual. Happy Holidays! https://github.com/FlightControl-Master/MOOSE/releases/tag/2.9.10 5
rwbishUP Posted February 2 Posted February 2 I'm building a mission on the Iraq map. I've implemented the A2G task dispatching for actual players. But, I also want to utilize the A.I. dispatcher for a little automated A.I. support. I'm wanting to set Tarawa and a super carrier as the airbases that assets are dispatched from. I'm having trouble figuring out how to assign these as "airbase" in the scripting. I've read through the documentation regarding wrapper:airbase and tried a few methods but can't seem to get it going. I can't find a reference to using carrier or FARP as the airbase, when using the A.I. Dispatcher. Detection and squadrons are working normally but the dispatch never happens because, based on what I see in the .log file. I'm not representing the carriers correctly as, airbases. Just for reference, this is what I'm struggling with. Could someone help me with how to use carrier as airbase in the script? A2GDispatcher:SetSquadron( "BAI_AV8", AIRBASE.NEED TO USE CARRIER HERE, { "Atk Harrier BAI" }, 10 ) AMD Ryzen 7 9800X3D, ROG ASTRAL RTX5080, G.SKILL TRI Z5 64gb, 4tb M.2 x 2, WIN 11 PRO x64
Amarok_73 Posted February 2 Posted February 2 Why don't You try just A2GDispatcher:SetSquadron( "BAI_AV8", AIRBASE:FindByName("ShipUnitNameHere"), { "Atk Harrier BAI" }, 10 ) 2 Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
rwbishUP Posted February 2 Posted February 2 (edited) 10 hours ago, Amarok_73 said: Why don't You try just A2GDispatcher:SetSquadron( "BAI_AV8", AIRBASE:FindByName("ShipUnitNameHere"), { "Atk Harrier BAI" }, 10 ) I'm still not having any luck with it. I can switch to a land based airfield and everything works perfectly, but I can't get it to recognize a carrier. A2GDispatcher:SetSquadron( "CAS_AV8", AIRBASE:FindByName("LHA"), { "Atk Harrier CAS" }, 2 ) Here is the output I'm getting through the tactical display. And here is what I'm getting in the .log . ERROR SCRIPTING (Main): Mission script error: [string "l10n/DEFAULT/Moose.lua"]:241927: attempt to index field 'Airbase' (a nil value) Also, I've got three squadrons set up SEAD, BAI and CAS. Edited February 2 by rwbishUP AMD Ryzen 7 9800X3D, ROG ASTRAL RTX5080, G.SKILL TRI Z5 64gb, 4tb M.2 x 2, WIN 11 PRO x64
Amarok_73 Posted February 2 Posted February 2 Can You share the mission here or in private message? 1 Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
rwbishUP Posted February 2 Posted February 2 (edited) 4 hours ago, Amarok_73 said: Can You share the mission here or in private message? Yeah, here is the one I'm working on. Trying to figure out what I'm doing wrong, got tired of having to load and exit my primary mission since it takes a bit to load and quit for some reason. So I threw a test bed together to try and get this straightened out. I'm using the same method essentially but with helos and getting the exact same result as with my main mission. I've tried quite a few methods in this test mission, but still can't get it to recognize the carrier or a FARP. tester mission.miz Edited February 3 by rwbishUP AMD Ryzen 7 9800X3D, ROG ASTRAL RTX5080, G.SKILL TRI Z5 64gb, 4tb M.2 x 2, WIN 11 PRO x64
Amarok_73 Posted February 3 Posted February 3 (edited) Looking into the Moose source file as well as into the documentation, in the AI_A2G_DISPATCHER:SetSquadron function I can see, that expected parameter for the airbase is just it's name, as AIRBASE:FindByName is already called from within the function, so try to provide just "LHA" as the airbase parameter without the "AIRBASE:FindByName()". Edited February 3 by Amarok_73 1 Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
rwbishUP Posted February 3 Posted February 3 9 hours ago, Amarok_73 said: Looking into the Moose source file as well as into the documentation, in the AI_A2G_DISPATCHER:SetSquadron function I can see, that expected parameter for the airbase is just it's name, as AIRBASE:FindByName is already called from within the function, so try to provide just "LHA" as the airbase parameter without the "AIRBASE:FindByName()". THANK YOU, YOU SOLVED IT! I'm not a script savvy person, I go strictly by the demo missions. Thanks for taking the time and putting up with my ignorance regarding this stuff! 1 AMD Ryzen 7 9800X3D, ROG ASTRAL RTX5080, G.SKILL TRI Z5 64gb, 4tb M.2 x 2, WIN 11 PRO x64
Amarok_73 Posted February 3 Posted February 3 All pleasure on my side. 1 Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
HungryCoyote Posted April 4 Posted April 4 (edited) Need a little help. I am trying to make a simple autolase mission. I kinda understand mist but just can not wrap my head around moose. I do not get any jtac info, either in comms menu or from the jtac. Obviously something is missing but I have no idea what. local recce = SPAWN:New("Reaper") :InitDelayOff() :OnSpawnGroup( function (group) local unit = group:GetUnit(1) local name = unit:GetName() autolaser:SetRecceLaserCode(name,1688) autolaser:SetRecceSmokeColor(name,SMOKECOLOR.Red) end ) :InitCleanUp(60) :InitLimit(1,0) :SpawnScheduled(30,0.5) local autolaser = AUTOLASE:New(FoxSet,coalition.side.BLUE,"Wolfpack",Pilotset) autolase1.miz Edited April 4 by HungryCoyote
Wingthor Posted April 4 Posted April 4 7 hours ago, HungryCoyote said: Need a little help. I am trying to make a simple autolase mission. I kinda understand mist but just can not wrap my head around moose. local recce = SPAWN:New("Reaper") :InitDelayOff() :OnSpawnGroup( function (group) local unit = group:GetUnit(1) local name = unit:GetName() autolaser:SetRecceLaserCode(name,1688) autolaser:SetRecceSmokeColor(name,SMOKECOLOR.Red) end ) :InitCleanUp(60) :InitLimit(1,0) :SpawnScheduled(30,0.5) local autolaser = AUTOLASE:New(FoxSet,coalition.side.BLUE,"Wolfpack",Pilotset) autolase1.miz 537.37 kB · 0 downloads Not sure what your problem is related to this mission. Moose has many sources for learning. You can find most of them by following this link. Also, Moose has a community in discord in which you can ask questions to dedicated people Moose community on Discord. Anyway, if you have a more precise description of your issue, I perhaps also can help you here. Regards. Moose framework contributor Moose scripting an DCS mission developer
MissionCMDR Posted April 4 Posted April 4 I suggest taking a look at Detection classes, specifically DESIGNATE and DETECTION_AREAS. DESIGNATE is actually an FSM, which has a ton of functionality to explore. For :InitLimit, why is the value (1,0)? You want 1 unit alive but no groups? For a single unit placement these definitions are the same. you will need (1,1) to have a unit spawn. The script as it is now will not spawn anything. FlightControl also has training videos demonstrating these classes and their use in high detail.
Amarok_73 Posted April 4 Posted April 4 4 hours ago, MissionCMDR said: The script as it is now will not spawn anything. You're wrong sir I am affraid. Here's what I use for my JTAC drones, and works like a charm: BlueJTAC1 = SPAWN :New("Blue_JTAC1") :InitLimit(1,0) :InitCleanUp( 120 ) :InitRepeat() :OnSpawnGroup( function(SpawnGroup) JTACAutoLase(SpawnGroup:GetName(), 1611, "vehicle") end) sBlueJTAC1 = SCHEDULER:New(nil, function() BlueJTAC1:Spawn(1) end, {}, 10, 10, 0.5) @HungryCoyote Regarding lasing and JTAC functionality, I used a well-made script (not my own), which I’ve attached here. JTACAutoLase.lua Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
Wingthor Posted April 4 Posted April 4 19 hours ago, HungryCoyote said: :SpawnScheduled(30,0.5) Will spawn GROUP Reaper if it exists in your mission editor (ME). Read the beginner section in the The MOOSE Companion Guide page 5-9 at least. Then check your dcs log file. Check for errors. Any error will halt your script. OnSpawnGroup() is a callback function which will "fire" when the GROUP is spawning. :InitLimit(1,0) will make only one live group at same time :InitLimit documentation Also check the Debug Guide. Moose framework contributor Moose scripting an DCS mission developer
MissionCMDR Posted April 6 Posted April 6 On 4/4/2025 at 2:50 PM, Amarok_73 said: You're wrong sir I am affraid. Here's what I use for my JTAC drones, and works like a charm: Absolutely correct, my apologies, I should test better. The one test I ran, I am not sure how I even arrived at that conclusion lol, but it's definitely at my end. Are parts of these MIST? Autolase is part of the DESIGNATE class in MOOSE used like this Designate:SetAutolase(true), hence my confusion, and a possible additional reason why stuff doesn't work right at my end as I do not have MIST loaded. I implement this in perhaps a more rudimentary way in my own mission scripts, using 3 lines of code (no MIST connections). AFACsetGroup = SET_GROUP:New():FilterPrefixes("JTAC Drone"):FilterStart() AFACdetectionZone = DETECTION_AREAS:New(AFACsetGroup, 1400) AFACdetectionZone:__Start(5) Simple JTAC for practice, no late activation, only a unit placed with a defined route. (it's actually the most fun out of all the scripts I have tried up to now)
Amarok_73 Posted April 6 Posted April 6 The script I attached uses parts of the MIST, but it's integral, and there's no need for additional MIST loading. I have prepared it long time ago, being unable to achieve what I wanted regarding designated targets prioritisation. Nowadays, I'd probably build the list of the spotted targets and priroritize it by my preference, staying within the MOOSE in whole. But as we know, Better is the enemy of Good, so I'll refrain from messing with it for a while yet. Natural Born Kamikaze ------------------------- AMD Ryzen 5 3600, AMD Fatal1ty B450 Gaming K4, AMD Radeon RX 5700 XT, 32 GB RAM Corsair Vengeance LPX, PSU Modecom Volcano 750W, Virpil Constellation Alpha Prime on Moza AB9 base, Virpil MongoosT-50CM3 Throttle, Turtle Beach VelocityOne Rudder.
MissionCMDR Posted April 7 Posted April 7 It's a cool challenge for a non-developer type person like me, but it can become a rabbit hole sometimes, especially when bouncing between scripting frameworks. For instance the code I pasted above now doesn't work and I have no idea why, but it's something I did or did not do, so apologies if it was tried and it did not work. DESIGNATE can prioritize targets and is a Finite State Machine. This is how you set it: Designate:SetThreatLevelPrioritization ( true ) Now I am off to see what mess I made in my own script, lol null
MissionCMDR Posted April 7 Posted April 7 Fixed it, I had removed the FAC -a task from the start waypoint for testing. It was added and all is working again.
Recommended Posts