Every race map needs at least THREE checkpoints, to ensure one can't cheat by going backwards. Depending on the size of the map, up to 10 checkpoints may be good.
A checkpoint can have two forms:
1. A huge brush entity. Make a trigger brush that completely covers some area the player has to go through. Make it so thick the player HAS to touch it and cannot pass through when he is too fast (just use 128qu thick checkpoints, that's safe). Turn that into a trigger_race_checkpoint.
2. A triggered entity. Make a trigger_race_checkpoint, but set spawnflags to 1 (NOTOUCH). Then target it by some switch, whatever. As a special case, you may also target it by a misc_teleport_dest. When teleporting to there, the checkpoint is also activated. Put the checkpoint brush then near the teleporter so players can see where to go. It works similarly with trigger_push's target_position.
Any checkpoint needs the property "cnt" to be set to the index of the checkpoint. Set that to 0 (or leave it out) for the finish line, to 1 for the first checkpoint, to 2 for the second, etc. It also needs targetname set.
Spawnpoints:
For each checkpoint, there should be some spawnpoints targeting it. In race mode, if you die, you'll respawn at a spawnpoint connected to the last checkpoint you had reached.
The finish checkpoint (the one with "cnt" being 0 or not set) is special: it needs some additional spawns for race-after-qualifying mode. The best one in the qualifying will spawn at the spawnpoint with "race_place" set to 1, the next best one at the one with "race_place" set to 2, etc. But: they all need target to be set to the finish line checkpoint anyway. Note that the finish line STILL needs spawnpoints with race_place not set - these are for people who joined the server later, or for qualifiyng (so you can have a running start).
Make sure the targeting arrows of the spawnpoints all point FORWARD. That is, you should respawn BEHIND the checkpoint they are connected to. After all, one should LOSE time when dying...
Bot waypoints:
Just put a single path of waypoints on the map. Bots are slow anyway.
Weapons:
You may want to turn off the shotgun on your race map. Do it with this mapinfo line:
- Code: Select all
settemp_for_type race g_start_weapon_shotgun 0
Additionally, you may want to keep weapons on your map, but give them low amounts of shots. Like this:
- Code: Select all
settemp_for_type race g_start_ammo_shells 0
settemp_for_type race g_pickup_shells 5
settemp_for_type race g_pickup_nails 30
settemp_for_type race g_pickup_rockets 6
settemp_for_type race g_pickup_cells 10
In qualifying, weapons can't be used at all (other than for accelerating yourself), while in race they are good to annoy/kill your enemies.
Example:

Checkpoint placement. Note the thick checkpoint boxes, and the spawnpoints linked to them.

Place spawnpoints, for race-after-qualifying mode. Like in Formula 1
