[MOOSE] RAT - Random Air Traffic - Page 37 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 03-27-2019, 11:35 AM   #361
HILOK
Junior Member
 
Join Date: Nov 2012
Posts: 40
Default

thanks for your assistance, funkyfranky!

i thought i solve the problem by letting the mentioned a/c go to zones instead, but now i am not getting any traffic at all! not even air spawned traffic that worked well before. no error messages either. any ideas?

new code (did not touch the rest of the code):
Code:
-- Fixed Destinations
a320:SetDestination({"RAT zone NE","RAT zone SE"})
--a320:SetDestination({"McCarran International Airport","North Las Vegas"})
--a380:SetDestination()
b727:SetDestination({"RAT zone NE","RAT zone SE"})
--b727:SetDestination({"McCarran International Airport","North Las Vegas"})
b737:SetDestination({"RAT zone NE","RAT zone SE"})
--b737:SetDestination({"McCarran International Airport","North Las Vegas"})
b747:SetDestination({"RAT zone NE","RAT zone SE"})
--b747:SetDestination("McCarran International Airport")
b757:SetDestination({"RAT zone NE","RAT zone SE"})
--b757:SetDestination("McCarran International Airport")
cessna:SetDestination({"Beatty Airport","Boulder City Airport","Henderson Executive Airport","North Las Vegas"})
trigger zones as shown in image attached.

thanks
HiLok
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	106
Size:	449.5 KB
ID:	207417  
HILOK is offline   Reply With Quote
Old 03-27-2019, 01:10 PM   #362
funkyfranky
Senior Member
 
funkyfranky's Avatar
 
Join Date: Sep 2015
Location: Asgård
Posts: 2,209
Default

Quote:
Originally Posted by HILOK View Post
i thought i solve the problem by letting the mentioned a/c go to zones instead, but now i am not getting any traffic at all! not even air spawned traffic that worked well before. no error messages either. any ideas?
If nothing spawns this strongly suggests that there is a typo or something which completely breaks the script. Check the DCS log file and/or post it here.
__________________
Multiple exclamation marks, are a sure sign of a diseased mind.
i7-8700K | Asus RTX 2080Ti Strix OC | 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S
RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
funkyfranky is online now   Reply With Quote
Old 03-28-2019, 08:12 AM   #363
HILOK
Junior Member
 
Join Date: Nov 2012
Posts: 40
Default

thanks, funkyfranky.
meanwhile i got the traffic back during mission runtime -no idea what caused THAT problem.
anyway...after some trial & error, i finally got it working, but frankly i dont understand exactly how

new code (remainder of the code posted before: same same)
Code:
-- Fixed Destinations
a320:SetDestination({"RAT_zone_NE","RAT_zone_SE"})
a320:DestinationZone()
--a320:ReturnZone()
--a320:SetDestination({"McCarran International Airport","North Las Vegas"})
--a380:SetDestination()
b727:SetDestination({"RAT_zone_NE","RAT_zone_SE"})
--b727:ReturnZone()
--b727:SetDestination({"McCarran International Airport","North Las Vegas"})
b737:SetDestination({"RAT_zone_NE","RAT_zone_SE"})
--b737:ReturnZone()
--b737:SetDestination({"McCarran International Airport","North Las Vegas"})
b747:SetDestination({"RAT_zone_NE","RAT_zone_SE"})
--b747:ReturnZone()
--b747:SetDestination("McCarran International Airport")
b757:SetDestination({"RAT_zone_NE","RAT_zone_SE"})
--b757:ReturnZone()
--b757:SetDestination("McCarran International Airport")
cessna:SetDestination({"Beatty Airport","Boulder City Airport","Henderson Executive Airport","North Las Vegas"})
--------------------------------------------------------------------------------------------
apparently this line did the trick:
Code:
a320:DestinationZone()
but i dont get why it would affect all other a/c types as well. maybe you could give me a little hint?
anyhow, i am very glad it is now working, and it does like a charm

thanks
HILOK is offline   Reply With Quote
Old 03-28-2019, 08:32 AM   #364
funkyfranky
Senior Member
 
funkyfranky's Avatar
 
Join Date: Sep 2015
Location: Asgård
Posts: 2,209
Default

Quote:
Originally Posted by HILOK View Post
but i dont get why it would affect all other a/c types as well. maybe you could give me a little hint?
Oh that can happen very easily. For example, a little typo in the script causes the script to exit with an error. Then even the correct stuff is often not executed any more. Happens to me all the time
__________________
Multiple exclamation marks, are a sure sign of a diseased mind.
i7-8700K | Asus RTX 2080Ti Strix OC | 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S
RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
funkyfranky is online now   Reply With Quote
Old 03-28-2019, 08:53 AM   #365
HILOK
Junior Member
 
Join Date: Nov 2012
Posts: 40
Default

sure, that's coding, right?

if you have time, could you pls take a moment and clarify how the
DestinationZone()
property/command(?) affects all aircraft spawned, although i applied it to the a320 group only?
thanks
HILOK is offline   Reply With Quote
Old 03-28-2019, 09:54 AM   #366
funkyfranky
Senior Member
 
funkyfranky's Avatar
 
Join Date: Sep 2015
Location: Asgård
Posts: 2,209
Default

Quote:
Originally Posted by HILOK View Post
if you have time, could you pls take a moment and clarify how the DestinationZone() property/command(?) affects all aircraft spawned, although i applied it to the a320 group only?
If you have only zones as destination, the script should actually automatically notice that and DestinationZone() should not be necessary. Aircraft will fly to one of the destination zones and get despawned when they arrive.

DestinationZone() should only be necessary if you have only airports in the destination list and do not want the aircraft to land. If DestinationZone() is set in this case, the ac will fly to a zone around the airport and be despawned in air. Can be useful if you send big aircraft to small air strips where they cannot land. Saves you the time to create an extra trigger zone around that airbase.

Not sure why you need to set it for the a320. You can try to comment that line. But it really does not hurt either to leave it in
__________________
Multiple exclamation marks, are a sure sign of a diseased mind.
i7-8700K | Asus RTX 2080Ti Strix OC | 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S
RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
funkyfranky is online now   Reply With Quote
Old 03-28-2019, 10:59 AM   #367
HILOK
Junior Member
 
Join Date: Nov 2012
Posts: 40
Default

hmmm, interesting. and strange. because you are describing what i would have expected, when looking at the example code and the doc. but in fact i got the errors (see posts above), when implementing zones without the command DestinationZone...
HILOK is offline   Reply With Quote
Old 04-09-2019, 02:47 PM   #368
HILOK
Junior Member
 
Join Date: Nov 2012
Posts: 40
Default

just a quick follow up on my nevada script. works quite ok, occasionally some errors or plane crashes... : )

however, all jets taking off from RWY 25 at north las vegas crash at the end of the runway. maybe someone has an idea regarding this issue?

here's the code, in case anybody wants to use (or correct) it:
Code:
-- Author: HiLok 03/2019
-- Notes: local b757air=RAT:New("RAT_B757air")  -- removed due to error: no valid destination found
--------------------------------------------------------------------------------------------


-- Aircraft --------------------------------------------------------------------------------
local a320=RAT:New("RAT_A320")
local b727=RAT:New("RAT_B727")
local b737=RAT:New("RAT_B737")
local b747=RAT:New("RAT_B747")
local b757=RAT:New("RAT_B757")
local cessna=RAT:New("RAT_Cessna")
local huey=RAT:New("RAT_UH1H")

-- AIR
local a320air=RAT:New("RAT_A320air")
local b727air=RAT:New("RAT_B727air")
local b737air=RAT:New("RAT_B737air")
local b747air=RAT:New("RAT_B747air")
local cessnaair=RAT:New("RAT_Cessnaair")
local hueyair=RAT:New("RAT_UH1Hair")  -- std skins, std cruise level

a320:DestinationZone()
a320:ATC_Messages(false)


-- Skins -----------------------------------------------------------------------------------
local a320skins={"American Airlines", "Frontier", "JetBlue"}
local b727skins={"ZERO G", "UNITED Old", "Southwest", "FedEx", "American Airlines", "Delta Airlines", "Delta Airlines OLD", "Northwest", "UNITED"}
local b737skins={"AM", "American_Airlines", "C40s", "Disney", "JA", "SouthWest Lone Star", "UPS"}
local b747skins={"AF", "AI", "CP", "IM", "KLM", "LH", "NW", "TA", "QA", "TA"}
local b757skins={"AA", "BA", "Delta", "DHL", "Swiss", "Thomson"}
local cessnaskins={"Muster", "N9572H", "SEagle blue", "SEagle red", "USAF-Academy"}

a320:Livery(a320skins)
b727:Livery(b727skins)
b737:Livery(b737skins)
b747:Livery(b747skins)
b757:Livery(b757skins)
cessna:Livery(cessnaskins)

-- AIR
a320air:Livery(a320skins)
b727air:Livery(b727skins)
b737air:Livery(b737skins)
b747air:Livery(b747skins)
cessnaair:Livery(cessnaskins)


-- Cruise FL -------------------------------------------------------------------------------
a320:SetFLmin(280)
a320:SetFLmax(370)
a320:SetFLcruise(350)

a320air:SetFLmin(280)
a320air:SetFLmax(370)
a320air:SetFLcruise(350)

b727:SetFLmin(280)
b727:SetFLmax(360)
b727:SetFLcruise(340)

b727air:SetFLmin(280)
b727air:SetFLmax(360)
b727air:SetFLcruise(340)

b737:SetFLmin(280)
b737:SetFLmax(410)
b737:SetFLcruise(370)

b737air:SetFLmin(280)
b737air:SetFLmax(410)
b737air:SetFLcruise(370)

b747:SetFLmin(280)
b747:SetFLmax(390)
b747:SetFLcruise(360)

b747air:SetFLmin(280)
b747air:SetFLmax(390)
b747air:SetFLcruise(360)

b757:SetFLmin(280)
b757:SetFLmax(370)
b757:SetFLcruise(360)

cessna:SetFLmin(7)
cessna:SetFLmax(115)
cessna:SetFLcruise(85)

cessnaair:SetFLmin(7)
cessnaair:SetFLmax(115)
cessnaair:SetFLcruise(85)


-- Departures ------------------------------------------------------------------------------
-- all except Mina: "Beatty Airport","Boulder City Airport","Creech AFB","Echo Bay","groom Lake AFB","Henderson Executive Airport","Jean Airport","Laughlin Airport","Lincoln County","McCarran International Airport","Mesquite","Nellis AFB","North Las Vegas","Pahute Mesa Airstrip","Tonopah Airport","Tonopah test Range Airfield"
a320:SetDeparture({"McCarran International Airport","North Las Vegas"})
b727:SetDeparture({"McCarran International Airport","North Las Vegas"})
b737:SetDeparture({"McCarran International Airport","North Las Vegas"})
b747:SetDeparture("McCarran International Airport")
b757:SetDeparture("McCarran International Airport")
cessna:SetDeparture({"Beatty Airport","Boulder City Airport","Henderson Executive Airport","North Las Vegas"})
huey:SetDeparture({"Boulder City Airport","Henderson Executive Airport","McCarran International Airport","Nellis AFB","North Las Vegas"})


-- Destinations ----------------------------------------------------------------------------
a320:SetDestination({"RAT_zone_NE","RAT_zone_SE"})
b727:SetDestination({"RAT_zone_NE","RAT_zone_SE"})
b737:SetDestination({"RAT_zone_NE","RAT_zone_SE"})
b747:SetDestination({"RAT_zone_NE","RAT_zone_SE"})
b757:SetDestination({"RAT_zone_NE","RAT_zone_SE"})
cessna:SetDestination({"Beatty Airport","Boulder City Airport","Henderson Executive Airport","North Las Vegas"})
huey:SetDeparture({"Boulder City Airport","Henderson Executive Airport","McCarran International Airport","Nellis AFB","North Las Vegas"})

-- AIR
a320air:SetDestination({"McCarran International Airport","North Las Vegas"})
b727air:SetDestination({"McCarran International Airport","North Las Vegas"})
b737air:SetDestination({"McCarran International Airport","North Las Vegas"})
b747air:SetDestination("McCarran International Airport")
cessnaair:SetDestination({"Beatty Airport","Boulder City Airport","Henderson Executive Airport","North Las Vegas"})
hueyair:SetDeparture({"Boulder City Airport","Henderson Executive Airport","McCarran International Airport","Nellis AFB","North Las Vegas"})


-- Traffic Density -------------------------------------------------------------------------
a320:Spawn(2)
b727:Spawn(2)
b737:Spawn(2)
b747:Spawn(3)
b757:Spawn(3)
cessna:Spawn(3)
huey:Spawn(1)

-- AIR
a320air:SetTakeoff("air")
a320air:Spawn(2)
b727air:SetTakeoff("air")
b727air:Spawn(2)
b737air:SetTakeoff("air")
b737air:Spawn(2)
b747air:SetTakeoff("air")
b747air:Spawn(2)
cessnaair:SetTakeoff("air")
cessnaair:Spawn(3)
hueyair:SetTakeoff("air")
hueyair:Spawn(1)

-- EOF -------------------------------------------------------------------------------------
HILOK is offline   Reply With Quote
Old 04-12-2019, 05:56 PM   #369
Seance12
Junior Member
 
Join Date: Dec 2017
Location: Ohio
Posts: 13
Default

Justa quick question:
I am trying to tweak the timings and settings to you Activate Uncontrolled Aircraft and if I put in
"ActivateUncontrolled(30, 120, 120, 0.5)", it works, and my question is what do the numbers represent?
Seance12 is offline   Reply With Quote
Old 04-16-2019, 08:01 AM   #370
funkyfranky
Senior Member
 
funkyfranky's Avatar
 
Join Date: Sep 2015
Location: Asgård
Posts: 2,209
Default

Quote:
Originally Posted by Seance12 View Post
"ActivateUncontrolled(30, 120, 120, 0.5)", it works, and my question is what do the numbers represent?
Number of max AC activated and time parameters for activating, c.f.
https://flightcontrol-master.github....teUncontrolled
__________________
Multiple exclamation marks, are a sure sign of a diseased mind.
i7-8700K | Asus RTX 2080Ti Strix OC | 32 GB Ram 3200 MHz DDR-4 | Asus Maximus Hero X | Samung EVO 960 Pro SSD | VKB Gunfighter Pro | MFG Crosswind | Rift S
RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss
funkyfranky is online now   Reply With Quote
Reply

Tags
moose, random air traffic, rat

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 10:33 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.