Jump to content

Recommended Posts

On 4/3/2021 at 9:09 AM, Rudel_chw said:

I use these kind of options on my missions, and the rat aircrafts then fly only between same coalition airbaseses:

 

local c17=RAT:New("RAT-C17")
c17:SetCoalitionAircraft("blue")
c17:SetCoalition("sameonly")
c17:SetTakeoff("cold")
c17:ExcludedAirports("Batumi")
c17:Spawn(2)

 

 

Thank you Rudel, It never occurred to me to assign coalition to both color and sameonly.

Apparently Excluded Airports isn't needed. It seems to be working so far. Saves me a lot of typing.

 

Any ideas yet on setting speed and altitude? I know I must be doing something wrong.

ASUS 990FX R2 Sabertooth MoBo  -  AMD FX 9590 @4.7Gb. No OC
GSkill RipJaws DDR3 32 Gb @1866 MHZ  -  EVGA GeForce GTX 1660Ti 6Gb
Game drive, Samsung 980 M.2 EVO SSD  -  Win10 Pro 20H2 drive, Samsung 860 EVO SATA SSD

Thrustmaster T-Flight HOTAS X  -  LG 32" 1920X1080 Monitor - Prestige ATX-PR800W PSU

Link to post
Share on other sites
  • Replies 607
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

I've done the exact same thing and had fun setting up the mission and leveraging the RAT functionality (thanks @funkyfranky)  One bookmark I use quite a bit is this one for MOOSE.  The documentation i

Hi guys,   I have been working on a new implementation - simply named RAT - to generate random air traffic. This is something I was missing a lot in many of my missions :)   So what is RAT about? R

Hello,   The actual script that is inside the mission isn't the one you show above .. .it is this one:   local yak=RAT:New("RAT_YAK") yak:Spawn(5)   When you edit a scr

43 minutes ago, rayrayblues said:

Any ideas yet on setting speed and altitude? I know I must be doing something wrong.


no, sorry, I never use those options as I use RAT mostly to add ambiance to the airbases .. their in-flight is not a concern to me 🙂

 

For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra

For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia GTX1070ti - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar - Oculus Rift CV1

Mobile: iPad Pro 12.9" of 256 GB

Link to post
Share on other sites
On 4/5/2021 at 11:46 AM, Rudel_chw said:


no, sorry, I never use those options as I use RAT mostly to add ambiance to the airbases .. their in-flight is not a concern to me 🙂

The reason I ask is, I am still not very good at shooting, so I have set up several "Target Practice" missions using RAT.

The advantage is that they don't shoot back or evade. They are sitting (flying) ducks and I still can't take them down reliably.

Usually they are too low and just a little too fast to catch up to. If I could get them up higher where I can see them and slow them down

just a little so I can catch up to them it would help.

ASUS 990FX R2 Sabertooth MoBo  -  AMD FX 9590 @4.7Gb. No OC
GSkill RipJaws DDR3 32 Gb @1866 MHZ  -  EVGA GeForce GTX 1660Ti 6Gb
Game drive, Samsung 980 M.2 EVO SSD  -  Win10 Pro 20H2 drive, Samsung 860 EVO SATA SSD

Thrustmaster T-Flight HOTAS X  -  LG 32" 1920X1080 Monitor - Prestige ATX-PR800W PSU

Link to post
Share on other sites
22 hours ago, rayrayblues said:

The reason I ask is, I am still not very good at shooting, so I have set up several "Target Practice" missions using RAT.

The advantage is that they don't shoot back or evade. They are sitting (flying) ducks and I still can't take them down reliably.

Usually they are too low and just a little too fast to catch up to. If I could get them up higher where I can see them and slow them down

just a little so I can catch up to them it would help.

I've done the exact same thing and had fun setting up the mission and leveraging the RAT functionality (thanks @funkyfranky)  One bookmark I use quite a bit is this one for MOOSE.  The documentation is outstanding.  https://flightcontrol-master.github.io/MOOSE_DOCS/

 

To answer your question, yes, you can establish the altitude for the spawned unit.

 

Here's the documentation for RAT - https://flightcontrol-master.github.io/MOOSE_DOCS/Documentation/Functional.Rat.html

 

I wrote a small script to spawn a random number of units at random altitudes across different zones.  I pass this script the unit name and the rest of the magic happens automatically.  Below is the code I wrote and you can see where I establish the altitude of the spawn.  If you want to make it fixed, just replace with a value instead of a random number.  Hope this helps!

 

--
--    Random Aircraft Spawn from Mission (RASM)
--    
--    Intent here is to allow the user, from a radio button, to pass in a mission created late activated aircraft and spawn it randomly into the mission
--    This code contains a function accepting the unit name from the mission
--    
--    This function uses the RAT (Random Air Traffic) element from MOOSE.  MOOSE must be loaded before this script in the mission.
--
--    

rasm = {}

function rasm.spawn(_UnitID)

local alt = math.random(5,350) -- setting a random altitude for the spawn(s) between 500-35,000 feet. 
local _numUnits = math.random(1,4) -- setting number of units to spawn between 1 and 4
local newunit=RAT:New(_UnitID) -- creating a new object to spawn into the mission using RAT (_UnitID is the name of unit from mission editor)
newunit:SetTakeoff("air")      -- spawning in the air
newunit:SetDeparture({"Spawn Zone1", "Spawn Zone2", "Spawn Zone3", "Spawn Zone4"})  -- Using trigger zones in the mission editor, the spawn can be in one of 4 zones
newunit:SetFLcruise(alt)       -- use the random altitude established
newunit:Spawn(_numUnits)       -- spawn a random number of units

end -- end rasm.spawn

 

 

  • Thanks 3

MM

[sIGPIC][/sIGPIC]

 

 

ASUS P9X79 | i7 3930K | 16GB DDR3 | Nvidia Geforce GTX780 | Win7 64 | HOTAS Thrustmaster T.16000M & TWCS

Yeah, I need a serious upgrade :)

 

Link to post
Share on other sites

@Mistermann Thank you sir, this will be very helpful.

  • Like 1

ASUS 990FX R2 Sabertooth MoBo  -  AMD FX 9590 @4.7Gb. No OC
GSkill RipJaws DDR3 32 Gb @1866 MHZ  -  EVGA GeForce GTX 1660Ti 6Gb
Game drive, Samsung 980 M.2 EVO SSD  -  Win10 Pro 20H2 drive, Samsung 860 EVO SATA SSD

Thrustmaster T-Flight HOTAS X  -  LG 32" 1920X1080 Monitor - Prestige ATX-PR800W PSU

Link to post
Share on other sites
  • 4 weeks later...
Posted (edited)

Hi there, I have a question around the following commands-

 

Set rules of engagement (ROE).

RAT:SetROE(roe)  

 

and

Set reaction to threat (ROT).
RAT:SetROT(rot)  

 

What should I add to the brackets?

 

Should it be something like this?-

setROE ("free")
setROT ("passive")

 

----

 

On 4/5/2021 at 8:01 PM, rayrayblues said:

Any ideas yet on setting speed and altitude? I know I must be doing something wrong.

 

Have a look at this file, it has a lot of examples you can use-

C:\Users\yourusername\Saved Games\DCS.openbeta\Mods\Aircraft\Civil Aircraft Mod\Missions\QuickStart\RAT Script_Caucasus.lua


Edited by BRAVO_16

Maintain thy airspeed lest the ground rise up and smite thee!

YiizHx5.gif

Link to post
Share on other sites
3 hours ago, BRAVO_16 said:

Should it be something like this?-

setROE ("free")
setROT ("passive")

 

Got it working, now the aircraft engage Red coalition aircraft.

this is what it looks like-

P51:SetROE ("free")
P51:SetROT ("passive")

  • Thanks 1

Maintain thy airspeed lest the ground rise up and smite thee!

YiizHx5.gif

Link to post
Share on other sites
7 hours ago, BRAVO_16 said:

Have a look at this file, it has a lot of examples you can use-

C:\Users\yourusername\Saved Games\DCS.openbeta\Mods\Aircraft\Civil Aircraft Mod\Missions\QuickStart\RAT Script_Caucasus.lua

 

Most helpful, thanks.   HVYapur.png     I couldn't help but notice that there are no entries for The Channel, or Syria, but

all of them are the same anyway.

ASUS 990FX R2 Sabertooth MoBo  -  AMD FX 9590 @4.7Gb. No OC
GSkill RipJaws DDR3 32 Gb @1866 MHZ  -  EVGA GeForce GTX 1660Ti 6Gb
Game drive, Samsung 980 M.2 EVO SSD  -  Win10 Pro 20H2 drive, Samsung 860 EVO SATA SSD

Thrustmaster T-Flight HOTAS X  -  LG 32" 1920X1080 Monitor - Prestige ATX-PR800W PSU

Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...