-
Notifications
You must be signed in to change notification settings - Fork 48
Race route definitions
There are two ways to define race routes
KTX race mode supports two new entity types: race_route_start race_route_marker
race_route_start requires the following properties: origin (vector) race_route_name (string) race_route_description (string) race_route_timeout (int) - in seconds race_route_weapon_mode (enum - matches KTX raceWeapoMode_t... 1 for no weapons, 2 for weapons, 3 for 2s delay) race_route_falsestart_mode (enum - matches KTX raceFalseStartMode_t - 1 for no fixed start, 2 for falsestart) target (string, must point to corresponding race_route_marker)
race_route_marker requires: origin (vector) targetname (string)
The last race_route_marker in the chain is the end of the route.
.route files are located in <gamedir>/race/routes/
directory.
Routes are defined inside race_route_add_start
/race_route_add_end
blocks
-
race_add_route_node <x> <y> <z> <pitch> <yaw>
- add a node to the race route. 1st is start, last is end. -
race_set_route_timeout <period>
- set maximum time player has to complete the route -
race_set_route_name "<shortname>" "<description>"
- set friendly description of the route -
race_set_route_falsestart_mode (raceFalseStartNo | raceFalseStartYes)
- enable/disable false-starting -
race_set_route_weapon_mode (raceWeaponNo | raceWeaponAllowed | raceWeapon2s)
- enable/disable weapons -
race_set_node_size <x> <y> <z>
- set size of the node that was last added -
race_add_speedtrap <x> <y> <z> <pitch> <yaw>
- add a speedtrap- When the speedtrap is no longer pointing towards the player it will trigger, telling the racer their current race time and speed. (for information only, no effect on the race)
.route files can also set flags on map entities (these must be defined outside of route definitions)
-
race_set_teleport_flags_by_name "<name>" (RACEFLAG_TOUCH_RACEFAIL | RACEFLAG_TOUCH_RACEEND)
- RACEFLAG_TOUCH_RACEFAIL: when teleporting to
<name>
, the player's route attempt fails - RACEFLAG_TOUCH_RACEEND: when teleporting to
<name>
, the player has ended the route
- RACEFLAG_TOUCH_RACEFAIL: when teleporting to