RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Bus DriverDamage GoalDemolition DerbyDistance GoalDrift GoalFinish Race GoalNo-Move GoalPosition GoalQuick RaceQuick Race LoaderRace MarkersRace DebugRace Goals ManagerRace UIScenario HelperScenario EngineScenarios LoaderSpeed GoalTime Limit GoalWaypoint ActionScenario Waypoints

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 Extensionsscenario

Waypoint Action

A scenario goal that displays flash messages when the player reaches specific waypoints. Unlike other goals, this is purely informational - it doesn't trigger win or fail conditions.

A scenario goal that displays flash messages when the player reaches specific waypoints. Unlike other goals, this is purely informational - it doesn't trigger win or fail conditions.


Internal State

FieldTypeDescription
M.instancesvariesAssigned as {}

Public API (Exports)

FunctionSignatureDescription
M.init(scenario)Parses and validates wayPointAction goals from scenario JSON
M.processState(scenario, state, stateData)Checks waypoint progress; shows messages
M.updateFinalStatus(scenario, instance)No-op (no pass/fail status)

Goal JSON Schema

{
  "goal": {
    "wayPointAction": {
      "wayPointNum": [2, 5, 8],
      "wayPointMsg": ["Turn left!", "Speed up!", "Almost there!"]
    }
  }
}
FieldTypeDefaultDescription
wayPointNumnumber[]requiredWaypoint indices to trigger messages at
wayPointMsgstring[]" "Messages to display (parallel array with wayPointNum)

How It Works

  1. init filters goals for id == "wayPointAction", validates wayPointNum is a table
  2. On onRaceWaypointReached event (only while running + racing):
    • Gets current waypoint index from scenario_waypoints.getVehicleWaypointData()
    • Iterates wayPointNum array - each entry must be a number
    • If vehWpData.cur matches a waypoint number, shows the corresponding wayPointMsg
  3. Messages displayed via helper.flashUiMessage with 2-second duration
  4. updateFinalStatus is empty - this goal has no scoring impact

Usage Example

-- In scenario JSON: show messages at waypoints 3 and 7
{
  "vehicles": {
    "scenario_player0": {
      "goal": {
        "wayPointAction": {
          "wayPointNum": [3, 7],
          "wayPointMsg": [
            "Watch out for the sharp turn!",
            "Final stretch - give it everything!"
          ]
        }
      }
    }
  }
}

Key Notes

  • Only triggers during onRaceWaypointReached when state is running + racing
  • wayPointNum and wayPointMsg are parallel arrays (index 1 matches index 1)
  • Validates both scenario lapConfig and wayPointNum are non-empty
  • Non-number entries in wayPointNum are logged as errors and skipped
  • If wayPointMsg is not provided, defaults to a space string " "
  • This is an informational goal - it never causes pass/fail

See Also

  • Scenario Bus Driver - Bus Route Scenario Logic - Related reference
  • Scenario Damage Goal - Damage-Based Win/Fail Condition - Related reference
  • Scenario Demolition Derby - Last Vehicle Moving Wins - Related reference
  • Scenario System Guide - Guide

Time Limit Goal

A scenario goal that fails the scenario if the player exceeds a maximum time. Supports countdown warnings and wait time after the limit.

Scenario Waypoints

M.dependencies = {'scenario_scenarios'}

On this page

Internal StatePublic API (Exports)Goal JSON SchemaHow It WorksUsage ExampleKey NotesSee Also