RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Flowgraph Base ModuleFlowgraph Base NodeFlowgraph Base State NodeFlowgraph Node BuilderFlowgraph GraphFlowgraph Group HelperFlowgraph LinkFlowgraph ManagerNew Node TemplateFlowgraph PinFlowgraph States ManagerFlowgraph UtilsFlowgraph Variable Storage
Race CP Reached (Flowgraph Node)Race Complete (Flowgraph Node)Race Config (Flowgraph Node)Race Restarted (Flowgraph Node)Race Started (Flowgraph Node)

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionsflowgraphnodestimetrials

Race CP Reached (Flowgraph Node)

- **Node Name:** `Race CP Reached`

Overview

  • Node Name: Race CP Reached
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/timetrials/onRaceCheckpoint.lua

Fires an impulse when the player drives through a race checkpoint. Tracks checkpoint index and lap count.

Pin Schema

Output Pins

PinTypeDescription
checkedflowImpulse when a checkpoint is reached
vehIdnumberID of the vehicle (hidden)
indexnumberIndex of the checkpoint reached
lapnumberCurrent lap number

Legacy Pin Mapping

Old NameNew Name
vehicleIDvehId

Behavior

  • init() - Initializes enterFlag and lap counter. Disables clearOutPinsOnStart.
  • _executionStarted() - Resets lap to 1 and clears enter flag.
  • onRaceWaypointReached(data) - Event handler: sets vehicle ID, checkpoint index, updates lap count via data.lapDiff, and sets the enter flag.
  • work() - Outputs the checked impulse if the flag was set, then clears it.
  • onScenarioRestarted() - Resets state via _executionStarted().

How It Works

  1. Place this node in a race/time-trial flowgraph.
  2. When the player hits a checkpoint, onRaceWaypointReached fires.
  3. The checked impulse goes high for one frame.
  4. Use index to identify which checkpoint, lap for the current lap.
-- Event data structure:
-- data.vehId  = vehicle ID
-- data.cur    = checkpoint index
-- data.lapDiff = lap increment (0 or 1)

-- Connect: checked → [Display Checkpoint UI]
-- Use index and lap for scoreboard updates

Key Dependencies

  • onRaceWaypointReached - Flowgraph event from the race system
  • onScenarioRestarted - Flowgraph event for race restart

See Also

  • Race Complete (Flowgraph Node) - Related reference
  • Race Config (Flowgraph Node) - Related reference
  • Race Restarted (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Send Message (Flowgraph Node)

- **Node Name:** `Send Message`

Race Complete (Flowgraph Node)

- **Node Name:** `Race Complete`

On this page

OverviewPin SchemaOutput PinsLegacy Pin MappingBehaviorHow It WorksKey DependenciesSee Also