User Tools

Site Tools


world_setup:game_features:racing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
world_setup:game_features:racing [2023/05/12 16:02] – created mitworld_setup:game_features:racing [2023/05/14 04:28] (current) – [Automated Races through Settings] mit
Line 1: Line 1:
 ===== Racing ===== ===== Racing =====
  
-Worlds can have a number of different race courses defined. You create these by setting up checkpoints along the course that the player must travel across, along with a starting region and finishing line.  Defining the course is done through the in-game World Editor.+Worlds can have a different race courses defined. You create these by setting up checkpoints along the course that the player must travel across, along with a starting region and finishing line.  Defining the course is done through the in-game World Editor.
  
 Races can be run either by having one player (or admin) 'hosting' the race - i.e. they choose when it starts - or they can be fully automated. Races can be run either by having one player (or admin) 'hosting' the race - i.e. they choose when it starts - or they can be fully automated.
Line 9: Line 9:
 <code>*raceinit [course_num] [entry_fee] <code>*raceinit [course_num] [entry_fee]
 *racejoin [player_name] [course_num] [Spawn_Mode] *racejoin [player_name] [course_num] [Spawn_Mode]
-*racestart [course_num] [start_mode]+*racestart [course_num]
 *raceleave [player_name] [course_num]</code> *raceleave [player_name] [course_num]</code>
  
Line 22: Line 22:
 ==== Racing Script Events & Sys Function==== ==== Racing Script Events & Sys Function====
  
-**RaceStart**  : Triggered once when the race starts.  ''$gTaskItem1'' will be set to the course number +**RaceStart**  : Triggered once when the race starts.  ''$gTaskItem1'' will be set to the course number\\ 
-**RaceEnd** +**RaceEnd**\\ 
-**RaceWinner** : Triggered with the details of the player who won the race.+**RaceWinner** : Triggered with the details of the player who won the race.\\ 
 +\\ 
 +**sysRaceIsActive( [course_num] )** can be used in script to find out if a race course is currently active.\\
  
-**sysRaceIsActive( [course_num] )** can be used in script to find out if a race course is currently active. 
  
 +==== Automated Races through Settings ====
  
-=== Automated Races through Settings ===+There are some settings that can be used to allow races to be created without script, and change the behaviour of races when they're created. It is recommended that if you're scripting your race you leave all these settings at 0 and handle any special behaviours in script code instead.
  
-TBD+''Raw Settings'' -> ''Subgame'' -> ''Race Vehicle''\\ 
 +Determines the vehicle that the player is set to if they join a race (If ''Racing Mode'' is set to something other than 0). If ''Race Vehicle'' set to 0, the player's vehicle won't be changed automatically, even if the mode is set.
  
 +
 +''Raw Settings'' -> ''Subgame'' -> ''Racing Mode''\\
 +**0**: No effect\\
 +**1**: Players are not allowed to join an automated race without a ''Racing License'' item. \\
 +**2**: Players are only allowed to join if they're in the vehicle set in ''Race Vehicle''\\
 +**3**: Mode for local-only races. Probably doesnt work.\\
 +**4**: Just sets the players vehicle to ''Race Vehicle''\\
 +**5**: Only sysops are allowed to use the 'Start Race' button *\\
 +\\
 +* (Note, how you get the 'Start Race' button to appear needs to be documented. Its somewhere in some weird menu settings :] )\\
  
  
world_setup/game_features/racing.1683925330.txt.gz · Last modified: 2023/05/12 16:02 by mit

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki