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.

[sIGPIC][/sIGPIC]

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

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

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

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

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.

[sIGPIC][/sIGPIC]

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 2

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...