Jump to content

MOOSE - Mission Object Oriented Scripting Framework


Recommended Posts

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.

image.png

DCS 2023-05-11 08-42-25.png

 

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?

  • Like 1
Link to comment
Share on other sites

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

  • Gigafiga
  • Members

Trick:

-Blue follow blue

-change 1 in red

blue will follow red

Exorcet

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 by RWC
  • Like 1
Link to comment
Share on other sites

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... 

  • Thanks 1

Romanian Community for DCS World

HW Specs: AMD 7900X, 64GB RAM, RTX 4090, HOTAS Virpil, MFG, CLS-E, custom

Link to comment
Share on other sites

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.

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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)

 

 

And I will execute vengeance in anger and fury upon the heathen, such as they have not heard.

                                                                                                                 Micah 5:15

Link to comment
Share on other sites

  • 1 month later...

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.

Link to comment
Share on other sites

  • 2 months later...

First of all, You're no good in copy-paste, I'm affraid...
null

image.png

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, Turtle Beach VelocityOne Rudder.

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...

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()

Link to comment
Share on other sites

  • 4 weeks later...
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!!

Link to comment
Share on other sites

  • 2 months later...

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 by Talon1-1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...