Jump to content

Racing system

Recommended Posts

  • Developer

Feature Showcase: Racing System


In order to diversify the activities offered to players, and to give a more interesting context to some of them, the racing system appears!

Reserved for a particular type of business and the administration, this system will allow everyone to have the chance to design their own circuit and to have all motor racing fans compete there, under the eyes of spectators who will be able to follow the progression of the ranking.



I The conditions of creation.

In this initial version, the script is limited to people with a particular permission, assigned by a flag (RACING), that only administration can provide.
This property allows anyone with the flag to have full access to the system, even in dimension 0. (Useful for events)

For others, and therefore for most of the people who will use this script, the system is limited to other dimensions, therefore to interiors, with a business type created especially for the occasion: Racing business.





II. Creating a circuit

Creating a circuit is quite simple. It is simply based on the checkpoint position along your route.

To get started, you need to create your race with /createrace [name] [nb laps]
You can specify a number of laps, but it is not required. by default this is 1.

You must be near your business to create a circuit. The rest of the operations can be done regardless of the position of your business, but you will only be able to create a circuit in the dimension in which you used /createrace.

When the race is created, you can start setting up your checkpoints. To do this, simply use /createracepoint [race ID] [Order]


Some instructions:

  • The race ID can be found in /raceslist, which is the command that allows you to find all your created races.
    • MXOvwVR.png
  • Order allows you to determine the order in which checkpoints are passed. So, naturally, you start by placing point 1, then point 2, etc. Be careful to respect the order of your checkpoints and not skip any steps. A circuit with checkpoints whose order is not precise will not be usable (forgetting a checkpoint, going from point 1 to point 3, etc.)
  • You must be at the exact position where you wish to place your checkpoint before using the command.

You can find all the checkpoints of your race with /pointsofrace [race ID], which makes it easy to know if you missed a step or not, and to retrieve checkpoints Ids.


It is possible to change the order of checkpoints with /changeracepointorder (/crpp) [point ID]
It is possible to change the position of a checkpoint with /changeracepointposition (/crpp) [point ID]




III. Initialize the race

To initiate a race, you will need to be near your business and use /initrace [race ID]. A notification will be sent to all players present in the dimension to specify that your race is now open for registration.

You can use /endrace to terminate it prematurely.

You can only run one race at a time.
Initializing a race does not prevent you from joining it as a runner or spectator.





IV. Join the race – Pilot and Spectator

All players present in the dimension are alerted by a notification when a race is available. Just use the following commands:

  • /joinrace [race ID] to join the race as a driver.
  • /spectaterace [race ID] to join the race as a spectator.

A spectator is a player who will have real-time information from the race, with a designed UI that summarizes the drivers' overall time and their position in the leaderboard.
As for the drivers, the UI will display their lap time, their total time, their ranking, the lap they are on.

For both UIs, the leaderboard will display when a player finishes the race or forfeits.

A driver can use /leaverace to leave the race before the start.
At any time, a spectator can use /stopspectaterace to stop following the race.



Here an example of racing UI, with chronometer at the bottom, and leaderboard on the right.





V. Course of the race

Drivers will see their time and ranking in real time, as the race progresses. The ranking and times are updated as soon as a player passes a checkpoint. Indicators will be used to show who has finished the race or who has withdrawn.

A driver can use /forfeit if he wants to leave the race midway.

When all the drivers have finished their race (finish line crossed or withdrawn), the UI disappears. Spectators keep their UI until the organizer definitively ends the race.

In any case, it is up to the organizer to end the race with /endrace. The goal is to be able to keep the results for as long as necessary after the last driver crosses the line.
Once /endrace is performed, all results are permanently lost, because the command resets all race data.







VI. Example






VII. All commands

  • /createrace [name] – Create a race with specific name
  • /deleterace [id] – Delete a race with its ID.
  • /raceslist – List of race created by the player.


  • /createracepoint [race ID] [Order] – Create a checkpoint for the specified race.
  • /deleteracepoint [point ID] – Delete a checkpoint with its ID.
  • /changeracepointposition (/crpp) [point ID] – Moove a specific checkpoint to player location.
  • /changeracepointorder (/crpp) [point ID] – Change order of passage of checkpoint.
  • /pointsofrace [race ID] – List all checkpoint of specified race.


  • /initrace [race ID] – Init the race.
  • /joinrace [race ID] – Join the rase as driver
  • /leaverace – Leave the race (Before it’s started)
  • /forfeit – Leave the race while it’s in progress.


  • /spectaterace [race ID] – Join the race as spectator.
  • /stopspectaterace – Stop watching race.
  • Upvote 13
  • Thanks 2
  • Applaud 1
Link to comment
This topic is now closed to further replies.
  • Create New...