Dangerzone Posted May 14, 2023 Posted May 14, 2023 22 hours ago, RWC said: Hi Developers, Would like to request a added TASK to escort / follow enemy aircraft as a task option. Now one can ONLY follow or escort a plane from the same coalition. BLUE AI -> Task : Follow / Escort -> RED AI. If there IS a way to do this bypassing the basic option by script or any other way, please add in the comment. Thanks. RWC. What is your actual purpose? I'm assuming that a Blufor plane isn't going to protect a Redfor plane, so can you please expand on exactly what you're wanting to achieve? ie: Are you wanting it to follow the aircraft without actually engaging it? Just as a brainstorm solution - there may be a way of doing it by dynamically on the fly updating the estimated fly-to position of the aircraft every 30 seconds or so as though it's trying to intercept the other aircraft - but since it's a flyto command instead of intercept - it would hold weapons? 1
RWC Posted May 14, 2023 Posted May 14, 2023 (edited) Hi Dangerzone m8, It came to my attention when a blue plane would fly inn to a red zone, then got intercepted by 2 red planes , that would then ESCORT/ FOLLOW the blue aircraft to a airfield of choice in the red zone. So the 2 red planes would have to follow the blue plane, or in a typical formation. But in DCS, one can only follow or escort planes from the same coalition, there was no other option in the ME for that, you see. So i wondered on how to do this , or if there was any moose script i could use to make this happened. Moose has been such a great asset for DCS in many many ways ! So yes, during this interception / escort , they would be in a 'weapons hold' state and ' no reaction to threat' state. Now i'm about to try out one of the suggestions i got : (thread: Gigafiga Members Trick: -Blue follow blue -change 1 in red blue will follow red Exorcet Members 4.4k You can change which countries are part of which coalition in the ME. The button for this is on the left, above the green fly button. So: Set Country A and Country B to Blue Set plane from Country B to follow plane from Country A Set Country A to Red Blue Country B plane will now be set to follow Red Country A plane Edited May 14, 2023 by RWC 1
Abburo Posted May 14, 2023 Posted May 14, 2023 On 5/12/2023 at 1:05 AM, Dangerzone said: Is it possible with the MOOSE version of CTLD to spawn, load, drop and unpack crates using vehicles in combined arms. I came across this video that uses DSMC's CTLD to do it (although comments there say that CTLD is now no longer part of DSMC) and was wondering if MOOSE has the same or similar capability? Check in the link below for K-Assistant : Simple Transport Script v 1.0 Mission Scripting | Forum 36° Stormo Virtuale (36stormovirtuale.it) This scripts allows you to transport various items with any vehicle you want and even more other functions. Even is not CTLD per'se, it can be used in conjuction with with it... 1 Romanian Community for DCS World HW Specs: AMD 7900X, 64GB RAM, RTX 4090, HOTAS Virpil, MFG, CLS-E, custom
Delta99 Posted May 20, 2023 Posted May 20, 2023 On 5/13/2023 at 7:38 AM, buur said: if it isn't the DCS API, it is not possible This isn't always true especially in this case. We've had entirely written from scratch escort processes that use other commands in the API. Granted they may not work well or be janky but sometimes they are actually way better than built in DCS API stuff. So it really depends. 2 My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
bellaevio Posted June 9, 2023 Posted June 9, 2023 kindly can someone write a moose script like AI.AI_A2G_Dispatcher for artillery though? Thank you. using the moose arty page i can't create an auto script where blue and red fight each other like AI.AI_A2G_Dispatcher. Thank you
buur Posted June 9, 2023 Posted June 9, 2023 vor 8 Minuten schrieb bellaevio: kindly can someone write a moose script like AI.AI_A2G_Dispatcher for artillery though? Thank you. using the moose arty page i can't create an auto script where blue and red fight each other like AI.AI_A2G_Dispatcher. Thank you Give the develop branch of Moose a trial. There is the ops.Chief class and it could do what you wish together with the other new ops classes. Best is you have a look on the Moose discord where you can find a lot of tips and help.
rwbishUP Posted June 16, 2023 Posted June 16, 2023 Having trouble with turning on "Tracing" in MOOSE. I've tried a few different ways but keep getting this in the log file: 2023-06-16 18:47:34.120 INFO SCRIPTING (Main): 9274(178504)/I: BASE00000.?(Tracing in MOOSE is OFF) Is this not correct? BASE:TraceOn() BASE:TraceAll(true) BASE:TraceLevel(1)
Padinn Posted July 29, 2023 Posted July 29, 2023 Is an updated invite for discord around? I wanted to download the airboss sound files but cant find them
buur Posted July 29, 2023 Posted July 29, 2023 vor 31 Minuten schrieb Padinn: Is an updated invite for discord around? I wanted to download the airboss sound files but cant find them https://discord.gg/gj68fm969S
Padinn Posted August 1, 2023 Posted August 1, 2023 I'm very new at this and would like to add asound upon takeoff. I think it would be done setting up the user sound and usersound.createontakeoff features but I'm at a loss to where to start and place it in the moose script. if anyone can point me towards a tutorial I appreciate it! I've tried reading through the guide on these but I'm pretty lost and could really use an example to help me.
Flasher Posted October 30, 2023 Posted October 30, 2023 Hi all, I'm driving crazy with ATIS moose script, sometimes it works sometimes not, who can help me ? Here si the mission script I use. Thanks Syria.miz
Amarok_73 Posted October 30, 2023 Posted October 30, 2023 First of all, You're no good in copy-paste, I'm affraid... null 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, Logitech G940 HOTAS, VPC MongoosT-50CM3 Throttle, VPC MongoosT-50CM2 Stick on MongoosT-50CM3 Base, Turtle Beach VelocityOne Rudder.
Apple Posted November 18, 2023 Posted November 18, 2023 Active runway needs a runway name, like "07R" or "21" not just "R". Watch your dcs.log for errors. Stretch out starting the instances a bit by using __Start(3) instead of Start(). For questions - join our discord. 1
Kantaim Posted December 3, 2023 Posted December 3, 2023 Hi. I'm super new to MOOSE. Anyway, I'm just trying to have respawning units keep their unit names. This is what I have, but whenever I look at the mission debrief, their names are these long strings of numbers instead of the Pilot Name in the Mission Editor. Did I make an error in my script or is the InitKeepUnitNames() bugged out right now? Spawn_Vehicle_1 = SPAWN :New ( "Spawn Vehicle 1" ) :InitKeepUnitNames() :InitLimit (2,4) :SpawnScheduled(3, .5) Spawn_Group_1 = Spawn_Vehicle_1:Spawn()
GWdope Posted December 29, 2023 Posted December 29, 2023 Hi, I'm wondering if anyone knows if there's a way to have a2a dispatcher randomize if a CAP is spawned. Say give a CAP zone a 50% chance a CAP will be assigned to that area at mission start?
Delta99 Posted January 2, 2024 Posted January 2, 2024 On 12/3/2023 at 5:38 PM, Kantaim said: Hi. I'm super new to MOOSE. Anyway, I'm just trying to have respawning units keep their unit names. This is what I have, but whenever I look at the mission debrief, their names are these long strings of numbers instead of the Pilot Name in the Mission Editor. Did I make an error in my script or is the InitKeepUnitNames() bugged out right now? Spawn_Vehicle_1 = SPAWN :New ( "Spawn Vehicle 1" ) :InitKeepUnitNames() :InitLimit (2,4) :SpawnScheduled(3, .5) Spawn_Group_1 = Spawn_Vehicle_1:Spawn() Unfortunately there is no way to get proper names in the mission debrief as far as I remember. Only static crap defined in the mission editor will come out with names in the debrief. Probably a feature the scripting folks have asked for a decade or more I would guess!! My Missions: Valley Patrol Mission :: Valley Escort Mission :: A2A Engagements
Talon1-1 Posted March 12, 2024 Posted March 12, 2024 (edited) I'm writing a script to get some missile parameters after a missile has been shot at a particular unit. My script is as follows: env.info("Script Running ::DEBUG") PlaneName = "Aerial-1-1" -- Create a new Event Handler Shot = EVENTHANDLER:New() -- Subscribe to Shot events Shot:HandleEvent(EVENTS.Shot) function Shot:OnEventShot(EventData) -- If shot is fired at plane if EventData.TgtUnitName == PlaneName then -- Shows plane name (no errors) local weaponName = EventData.WeaponName env.info(EventData.WeaponName .. " has been fired at ECM unit ::DEBUG") -- Supposedly gets weapon local missile = EventData.Weapon -- Error in SCHEDULER function, attempt to call field 'StartTrack' (a nil value) missile.StartTrack() env.info(missile.ClassName .. " is being tracked ::DEBUG") end end According to the docs on EventData, EventData is supposed to carry with it the Weapon class and it should be accessible via EventData.Weapon or EventData.weapon. When I try to access EventData.Weapon's attributes, All of them return an error saying that attribute is a nil value. I believe that I'm not accessing the Weapon object in the right way. How do I access the Weapon object's attributes? Edited March 12, 2024 by Talon1-1
Talon1-1 Posted March 12, 2024 Posted March 12, 2024 (edited) Apparently right after I post a question, I've answered it myself. Checkout this link For posterity, one can look at MOOSE's new github repository. Edited March 12, 2024 by Talon1-1
Wingthor Posted April 11, 2024 Posted April 11, 2024 20 hours ago, Qazplm said: 难道这样用吗? EWR = SET_GROUP:New() EWR:FilterPrefixes( { "Ewr1" } ) EWR:FilterStart() Jianchezhongxin = DETECTION_AREAS:New( EWR, 100000 ) Jianchezhongxin:SetRefreshTimeInterval( 20 ) Jianchezhongxin:CalculateIntercept(Jianchezhongxin.DetectedItems) RedCap_1 = AI_A2A_DISPATCHER:New( Jianchezhongxin ) -- or -- local Detectedltems=Jianchezhongxin.DetectedItems Jianchezhongxin:CalculateIntercept(Jianchezhongxin.DetectedItems) 真的搞不懂 It's difficult to help you cause I don't understand what you want to achieve.Your Chinese "is greek to me."However, if you need help, you can join the Moose Discord group. If you will have help in this forum please be be more specific about whats the problem, preferably in English. Moose framework contributor Moose scripting an DCS mission developer
Qazplm Posted April 11, 2024 Posted April 11, 2024 3小时前,Wingthor说: 很难帮助你,因为我不明白你想实现什么。你的中文“对我来说是希腊语”。但是,如果您需要帮助,可以加入 Moose Discord 群组。如果您在此论坛上获得帮助,请更具体地说明问题所在,最好是英文。 Thank you, I tried to express it in English. Hi guys, I would like to write an AI_A2G_DISPATCHER script as follows: DetectionGroup = SET_GROUP:New():FilterPrefixes( {"ZhenChaji", "HQ BLUE", "Reccc"} ):FilterCoalitions("blue"):FilterStart() Groundetection = DETECTION_AREAS:New( DetectionGroup, 2000 ) :CalculateIntercept(DetectedItem) :SetFriendliesRange( 60000 ) :SetRefreshTimeInterval( 5 ) :SetIntercept(true, 5) :DetectedReportDetailed(AttackGroup) Groundetection:Start() --- A2GDispatcher = AI_A2G_DISPATCHER:New( Groundetection ) A2GDispatcher:SetCommandCenter( CC ) -- A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ BLUE #006" ):GetCoordinate() ) A2GDispatcher:AddDefenseCoordinate( "HQone", GROUP:FindByName( "HQ BLUE #005" ):GetCoordinate() ) CCCPBorderZone = ZONE_POLYGON:New( "zone one", GROUP:FindByName( "HFDMBianjie" ) ) A2GDispatcher:SetBorderZone(CCCPBorderZone) A2GDispatcher:SetDefenseReactivityHigh() A2GDispatcher:SetDefenseRadius(100000 ) A2GDispatcher:SetIntercept(180) ---- DetectedItem is required. But my first contact with this thing, I don't know how to write, or how to get DetectedItem. I've tried several methods, but none of them are right, can someone help me?
Wingthor Posted April 12, 2024 Posted April 12, 2024 (edited) 21 hours ago, Qazplm said: Thank you, I tried to express it in English. Hi guys, I would like to write an AI_A2G_DISPATCHER script as follows: DetectionGroup = SET_GROUP:New():FilterPrefixes( {"ZhenChaji", "HQ BLUE", "Reccc"} ):FilterCoalitions("blue"):FilterStart() Groundetection = DETECTION_AREAS:New( DetectionGroup, 2000 ) :CalculateIntercept(DetectedItem) :SetFriendliesRange( 60000 ) :SetRefreshTimeInterval( 5 ) :SetIntercept(true, 5) :DetectedReportDetailed(AttackGroup) Groundetection:Start() --- A2GDispatcher = AI_A2G_DISPATCHER:New( Groundetection ) A2GDispatcher:SetCommandCenter( CC ) -- A2GDispatcher:AddDefenseCoordinate( "HQ", GROUP:FindByName( "HQ BLUE #006" ):GetCoordinate() ) A2GDispatcher:AddDefenseCoordinate( "HQone", GROUP:FindByName( "HQ BLUE #005" ):GetCoordinate() ) CCCPBorderZone = ZONE_POLYGON:New( "zone one", GROUP:FindByName( "HFDMBianjie" ) ) A2GDispatcher:SetBorderZone(CCCPBorderZone) A2GDispatcher:SetDefenseReactivityHigh() A2GDispatcher:SetDefenseRadius(100000 ) A2GDispatcher:SetIntercept(180) ---- DetectedItem is required. But my first contact with this thing, I don't know how to write, or how to get DetectedItem. I've tried several methods, but none of them are right, can someone help me? Preferably it would be better to support you in a Discord channel, since its more convenient to realtime chat than do support in a forum like this.However, I understand language might represent an issue for you. Ill try supporting you here. I am not quite sure if you get any errors in your dcs.log file. Probably you do, cause this line: CalculateIntercept(DetectedItem looks strange . Perhaps just remove it. You will find documentation for how to set up DETECTION at this URL https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Functional.Detection.html , and you will find documentation for AI_A2G_Dispatcher at this URL https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/AI.AI_A2G_Dispatcher.html At this URL you can find example missions with code for the AI_A2G_Dispatcher class https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/AI/AI_A2G_Dispatcher If you’re starting out or looking for information, please read these first and it might be worth doing some basic Lua tutorials. No use getting frustrated by jumping into the pool without being able to swim. There are some docs that can help you out (very easily over looked) Moose users manual - https://github.com/FlightControl-Master/MOOSE_GUIDES/releases/download/v0.1-rc1/Moose_User_Guide.pdf <<< read first chapter at least ** Basic Moose debugging guide PDF - <https://ufile.io/nzduno3q> MOOSE demo missions, great source http:// https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop MOOSE documentation, has info on functions and how to use them - https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/ Lua tutorialhttp:// https://www.tutorialspoint.com/lua/index.htm Edited April 12, 2024 by Wingthor Moose framework contributor Moose scripting an DCS mission developer
MasterZelgadis Posted July 8, 2024 Posted July 8, 2024 Hey, is the message function broken? Everything I try results in an error in the log: "ERROR SCRIPTING (Main): Mission script error: [string "C:\Users\Stefan\AppData\Local\Temp\DCS.openbeta\/~mis0000602A.lua"]:34739: attempt to index local 'MessageCategory' (a number value) stack traceback: [C]: ? [string "C:\Users\Stefan\AppData\Local\Temp\DCS.openbeta\/~mis0000602A.lua"]:34739: in function 'New' [string "-- Client = CLIENT:FindByName("Aerial-1-2")..."]:2: in main chunk I tried with the recent master and dev version of moose. In the script I tried just the examples from the MOOSE documentation: MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25 ):ToAll() "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 9, 2024 Posted July 9, 2024 (edited) 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 Edited July 9, 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, Logitech G940 HOTAS, VPC MongoosT-50CM3 Throttle, VPC MongoosT-50CM2 Stick on MongoosT-50CM3 Base, Turtle Beach VelocityOne Rudder.
Wingthor Posted July 9, 2024 Posted July 9, 2024 10 hours ago, MasterZelgadis said: Hey, is the message function broken? Everything I try results in an error in the log: "ERROR SCRIPTING (Main): Mission script error: [string "C:\Users\Stefan\AppData\Local\Temp\DCS.openbeta\/~mis0000602A.lua"]:34739: attempt to index local 'MessageCategory' (a number value) stack traceback: [C]: ? [string "C:\Users\Stefan\AppData\Local\Temp\DCS.openbeta\/~mis0000602A.lua"]:34739: in function 'New' [string "-- Client = CLIENT:FindByName("Aerial-1-2")..."]:2: in main chunk I tried with the recent master and dev version of moose. In the script I tried just the examples from the MOOSE documentation: MESSAGE:New( "To all Players: BLUE has won! Each player of BLUE wins 50 points!", "End of Mission", 25 ):ToAll() 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. Moose framework contributor Moose scripting an DCS mission developer
Recommended Posts