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
ARunForLife (Flowgraph Node)Clear Lights Drag Race (Flowgraph Node)Countdown Lights Controller (Flowgraph Node)Get Custom Vehicle Data (Flowgraph Node)Get Mission Setup Data (Flowgraph Node)Check Players Position / Go To Start Line (Flowgraph Node)KnockAway Check (Flowgraph Node)Lights Controller (Flowgraph Node)Mission Post Clean (Flowgraph Node)Mission Cleanup / Pre Clean (Flowgraph Node)Prepare Vehicle (Flowgraph Node)Remove Stashed Player Vehicle (Flowgraph Node)Select Garage Vehicle (Flowgraph Node)Select Garage Sites / Zones (Flowgraph Node)Select Garage Spots (Flowgraph Node)Select Heist Spots (Flowgraph Node)Set Stage Lights (Flowgraph Node)Update Display Drag Race (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 Extensionsflowgraphnodesmission

KnockAway Check (Flowgraph Node)

- **Node Name:** `KnockAway Check`

Overview

  • Node Name: KnockAway Check
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/mission/knockAwayCheck.lua

Detects if vehicles from a prefab have been knocked away (tipped over or moved from their original position). Used for destruction/bowling-style missions. Supports overhead markers and minimap indicators.

Pin Schema

Input Pins

PinTypeDescription
flowflowInflow for this node
resetflow (impulse)Resets the detection state
prefabIdnumberID of the prefab containing target vehicles
considerTippingboolCount vehicles as knocked if tipped (default: true, hidden)
tippingMinAnglenumberMinimum tipping angle in degrees (default: 45, hidden)
considerMovingboolCount vehicles as knocked if moved (default: true, hidden)
movingMinDistnumberMinimum displacement in meters (default: 1, hidden)
showMarkersboolShow overhead markers above targets (default: true, hidden)
defaultPointsnumberDefault points per vehicle (hidden)

Output Pins

PinTypeDescription
flowflowOutflow for this node
doneflowActive when all vehicles have been knocked away
countnumberNumber of vehicles knocked away so far
totalnumberTotal number of target vehicles
pointsnumberCurrent points earned (hidden)
maxPointsnumberMaximum possible points (hidden)

Internals

FieldPurpose
self.originalVehicleTransformsOriginal positions/rotations of all prefab vehicles
self.vehicleHitTable tracking which vehicles have been knocked
self.vehiclePointsPer-vehicle point values (from knockAwayPoints dynamic field or default)
self.markersscenario/race_marker module for overhead markers
self.positionsStored positions for minimap rendering
self.data.zOffsetVertical offset for marker positions

How It Works

  1. Setup (first frame): Reads all BeamNGVehicle children from the prefab, records their original transforms (position, rotation, up-vector). Vehicles with ignore in their internal name are excluded.
  2. Tipping Detection: Compares current dirVecUp dot product with original up-vector against the minimum angle threshold.
  3. Movement Detection: Measures distance between current and original positions against movingMinDist.
  4. Markers: Overhead markers appear above un-knocked vehicles and hide when knocked. Uses scenario/race_marker module.
  5. Minimap: Orange circle indicators and edge pointers show remaining targets.
  6. Points: Each vehicle can have a custom knockAwayPoints dynamic field, or uses the defaultPoints pin value, or defaults to 1.
  7. Completion: done fires when hitCount == totalCount.

Lua Example

-- Setup in level editor:
-- 1. Create a prefab with multiple vehicles (e.g., parked cars)
-- 2. Optionally set dynamic field "knockAwayPoints" on high-value targets
-- 3. Set "ignore" in internal name for vehicles that shouldn't count

-- Flowgraph:
-- prefabId → this node
-- count/total → UI progress display
-- done → mission complete trigger

Key Dependencies

  • self.mgr.modules.prefab - prefab data and vehicle transforms
  • self.mgr.modules.vehicle - vehicle tracking registration
  • map.objects - runtime vehicle position/rotation data
  • scenario/race_marker - overhead marker rendering
  • ui_apps_minimap_utils - minimap indicators
  • _flowgraph_createNode() - standard flowgraph node registration

Additional Methods

C:_executionStarted()

Called when graph execution starts. Used for initialization/reset.

C:_executionStopped()

Called when graph execution stops. Used for cleanup.

C:getOriginalVehicleTransforms(data)

Node method.

Parameters:

  • data

C:init()

Initializes the node, setting up pins and default properties.

C:onDrawOnMinimap(td)

Node method.

Parameters:

  • td

C:onPreRender(dt, dtSim)

Node method.

Parameters:

  • dt
  • dtSim

C:work()

Main work function called each frame/tick when the node is active.


See Also

  • ARunForLife (Flowgraph Node) - Related reference
  • Update Display Drag Race (Flowgraph Node) - Related reference
  • Clear Lights Drag Race (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Check Players Position / Go To Start Line (Flowgraph Node)

- **Node Name:** `Check Players Position`

Lights Controller (Flowgraph Node)

- **Node Name:** `Lights Controller`

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsHow It WorksLua ExampleKey DependenciesAdditional MethodsC:_executionStarted()C:_executionStopped()C:getOriginalVehicleTransforms(data)C:init()C:onDrawOnMinimap(td)C:onPreRender(dt, dtSim)C:work()See Also