Jump to content

Cross-Country race script


Recommended Posts

Inspired by BB.'s race script, I created this cross-country version.

The course doesn't have to be a lap, but can run from one place to another.

The script keeps track of anyone flying inside the course, and also checks for missed gates, flying the wrong way, etc.

 

The course is set up using a series of large trigger zones to create a corridor in which players are detected as race participants, and a series of small trigger zones to make up the gates.

All gates must be inside the corridor, otherwise the script can't keep time correctly.

 

To use the script, you will need to define three triggers in your mission:

1. At mission start, (no condition), do script --> enter parameters

2. Once, Time more than 1, do script file "mist_4_3_73.lua"

3. Once, Time more than 2, do script file "CrossCountryRace.lua"

 

See the attached screenshots for details.

 

Current features:

- Keep time for all individual aircraft in course

- Show intermediate times for all individual aircraft in course

- Show player with fastest time

- Compare intermediate and total time to fastest time

- Top-10 of fastest players

 

Planned features (wishlist):

- Maximum course altitude

- Maximum altitude per gate

- Distinguish between clients and AI (currently AI is also registered as airrace participant)

 

Please let me know if you find any bugs or other problems with this script.

 

[edit]

 

Finally had time to update the script, it is now compatible with DCS World 1.5.4 and uses mist 4.3.73.

I updated the script and the test mission in the attachments.

Screen_140203_232214.thumb.jpg.67dbd0870b2f21c0227c95236605586c.jpg

Screen_140203_232251.thumb.jpg.8a879dc5c040a9f92dc4112e9fa7fe58.jpg

Screen_140203_232322.thumb.jpg.3198794fb94395a7076945d36630355b.jpg

Screen_140203_232333.thumb.jpg.4fc9f8025fda9d31be4a0c1d3679a63f.jpg

Screen_140203_232458.thumb.jpg.cc6c1d620d0f61b9f45450a0d067156c.jpg

Screen_140203_233913.thumb.jpg.f657cb6babdefc12eb1ea9abcc6390c1.jpg

CrossCountryRace.lua

Race Test.miz


Edited by Joe Kurr
  • Like 1
Dutch Flanker Display Team | LLTM 2010 Tiger Spirit Award
Link to comment
Share on other sites

  • 1 year later...

is there any way you know of to display the current race time on screen , but not the scrolling debug list you have now, just something neat and tidy up in the corner, kind of like the fps counter?

 

thx

My kit: i7-4790K@4GHz / 8GB - GTX 980ti + rift CV1 - X52 pro - Multi Keyboard Remapper - 2DOF motion sim (in development)

Link to comment
Share on other sites

  • 3 weeks later...
  • 8 months later...
  • 1 month later...

Tried this recently, the scripts in the mission and the script supplied seperate are diffferent which could be confusing for people. Not sure how to solve the flickering on the screen at the start and shortly after each gate.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Link to comment
Share on other sites

  • 3 years later...

Hi guys! ( of course those who are still alive))))

 

I upgraded this script for the rules of Red Bull Air Race and Yak-52 aircraft:

And so, what came of it:

- the track is built on regular pylons (no additional mods except the actual module Yak-52 is not required)

- there is a time counter

- - there is a check for the passage of the gate in height (both horizontal and single pilots) no higher than 25 m

- there is a check for the passage of horizontal gates on the roll, no more than 10 degrees.

- there is a speed check when passing the starting gate, no more than 300 km / h

- well, of course there is a check for the Downing of pylons

 

 

penalties:

+2 seconds for non-horizontal passage of the gate

+2 seconds for exceeding the height

+3 seconds for a downed pylon

DNF (did not finish) speeding at the starting gate

DNF (did not finish) three of the downed pylons


Edited by avrora74
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
  • 5 months later...

Hi, I'm a noob when it comes to scripting, but I've got Basman's script working well on an air race.  I have 2 issues I'm hoping someone can help with.

 

1.  If a player crashes, and respawns, they are still listed as being in the race area, and cannot reinitialise the start of the race.

 

2.  I'm using comms towers, and if pilots crash into them, they can get destroyed.  Is there a way to make all the comms towers immortal?

TIA.

i7 10700k @4.8GHz | Aurora GTX 3080 | Samsung NVMe m.2 970 Pro 1Tb x 3 | Corsair 64GB DDR4 3200MHz

HP Reverb G2 | Vkb Gunfighter II MCG Pro Stick | Virpil T-50CM Throttle | MFG Crosswind Pedals | Custom built collective | 150 button custom cockpit with 3 x Cougar MFDs

Link to comment
Share on other sites

  • 1 year later...

Reopening an old post. But I cannot get this script running properly. 

The error I'm encountering is that when passed the 1st gate the timer starts then all other gates are not recognised, calling missed gates on all following gates. I'm using the script directly from your github and am using the standard show cones as Pylons and oblong Gates labelled correctly as per instructions on your github. I can't see what issue I'm missing here but it's getting frustrating! 

 

Kind regards 

Joe Couzens-Howard 

Link to comment
Share on other sites

  • 4 months later...
On 5/17/2022 at 9:31 PM, RedBear311 said:

Reopening an old post. But I cannot get this script running properly. 

The error I'm encountering is that when passed the 1st gate the timer starts then all other gates are not recognised, calling missed gates on all following gates. I'm using the script directly from your github and am using the standard show cones as Pylons and oblong Gates labelled correctly as per instructions on your github. I can't see what issue I'm missing here but it's getting frustrating! 

 

Kind regards 

Joe Couzens-Howard 

I dont know if its me but aswell, i fly in the Race Zone #001 and subsequently Gate #001 nothing starts

 

Edit: The Github one with AirRace3.lua works for me


Edited by BuxtonHouse
  • Thanks 1
Link to comment
Share on other sites

  • 3 months later...

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