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

ARunForLife (Flowgraph Node)

- **Node Name:** `ARunForLife`

Overview

  • Node Name: ARunForLife
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/mission/ARunForLife.lua

A complex all-in-one flowgraph node that drives a "Run For Life" minigame scenario. The player's camera scrolls forward while props (obstacles) spawn on lanes. The player must dodge, push balls, jump ramps, crash gates, and collect coins/repair buffs to score points.

Pin Schema (Summary)

Key Input Pins

PinTypeDescription
resetflow (impulse)Resets the game state
plIdnumberPlayer vehicle ID
pooltableVehicle pool containing all spawnable props
minPropLine / maxPropLinenumberMin/max props per spawn line
baseTimeToNextLinenumberAverage time between spawn lines
startCamSpeed / maxCamSpeednumberCamera scroll speed range
camNaturalAccelnumberCamera acceleration rate
gatePoints / ballPoint / jumpPointsnumberScoring values
coinTime / repairBuffCostnumberBuff timing and costs
bronze / silver / goldnumberMedal thresholds
cont1id – cont12idnumberContainer IDs for scrolling scenery
cannon / jumpRamp / crashGate / coinTrigger / repairTriggerflow (impulse)Trigger events

Key Output Pins

PinTypeDescription
scorenumberCurrent score
totalBonusScorenumberPoints from bonus actions
timeLeftToLosenumberCountdown when player is out of bounds
camSpeednumberCurrent camera speed
coinsnumberCollected coins
currMedalstringCurrent medal tier
lostflow (impulse)Fires when player loses
repairedflow (impulse)Fires when vehicle is repaired
Various *Posvec3Trigger positions for ramp, gate, cannon, etc.

How It Works

  1. Initialization: On first frame (or reset), links prop pool, containers, and creates decal pools.
  2. Camera: Scrolls forward with acceleration. Slows down during repair buff, then catches up.
  3. Scoring: Base score scales with player position (closer to front = more points). Bonus points from ramp jumps, gate crashes, and ball pushing.
  4. Prop Spawning: Props spawn on 5 lanes at random intervals ahead of the camera. Inactive props recycle from a pool.
  5. Buffs: Coin buff spawns on a timer; collecting enough coins unlocks a repair buff that freezes and repairs the vehicle.
  6. Lose Condition: If the player is outside the camera zone for 5 seconds, they lose.
  7. Decals: Arrow decals drawn above interactive props (ramps, gates, ball). Red arrow shows player position when behind camera.
  8. Containers: Background scenery containers teleport cyclically to create infinite scrolling.

Key Dependencies

  • core_camera - camera position/rotation control
  • spawn.safeTeleport() - safe prop repositioning
  • core_vehicleBridge - freeze/unfreeze vehicle for repair
  • Engine.Render.DynamicDecalMgr - dynamic decal rendering
  • map.objects - vehicle tracking data
  • _flowgraph_createNode() - standard flowgraph node registration

Additional Methods

C:activateBuff(buff, pos)

Node method.

Parameters:

  • buff
  • pos

C:activatePropsAndBuffs()

Node method.

C:calcMedal()

Node method.

C:checkBuffAvailabilty()

Node method.

C:checkCoinForRepair()

Node method.

C:checkLose()

Node method.

C:checkTriggers()

Node method.

C:coinBuff()

Node method.

C:createDecalPool()

Node method.

C:deactivateBuff(buff)

Node method.

Parameters:

  • buff

C:deactivateProp(propName)

Node method.

Parameters:

  • propName

C:deactivatePropsAndBuffs()

Node method.

C:doBuffsTime()

Node method.

C:doScore()

Node method.

C:drawDecals()

Custom ImGui drawing function for the node editor.

C:getBuffByName(name)

Node method.

Parameters:

  • name

C:getBuffNextTime(baseTime)

Node method.

Parameters:

  • baseTime

C:getPropByName(name)

Node method.

Parameters:

  • name

C:increaseDecalPool(amount)

Node method.

Parameters:

  • amount

C:linkContainers()

Node method.

C:linkProps()

Node method.

C:moveCamera()

Node method.

C:moveTriggers()

Node method.

C:pushBall()

Node method.

C:resetValues()

Node method.

C:setParameters()

Node method.

C:setReferences()

Node method.

C:slowDownCar()

Node method.

C:tpContainers()

Node method.

C:updateValues()

Node method.

C:work()

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


See Also

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

Split (Flowgraph Node)

- **Node Name:** `Split`

Clear Lights Drag Race (Flowgraph Node)

- **Node Name:** `Clear Lights Dragrace`

On this page

OverviewPin Schema (Summary)Key Input PinsKey Output PinsHow It WorksKey DependenciesAdditional MethodsC:activateBuff(buff, pos)C:activatePropsAndBuffs()C:calcMedal()C:checkBuffAvailabilty()C:checkCoinForRepair()C:checkLose()C:checkTriggers()C:coinBuff()C:createDecalPool()C:deactivateBuff(buff)C:deactivateProp(propName)C:deactivatePropsAndBuffs()C:doBuffsTime()C:doScore()C:drawDecals()C:getBuffByName(name)C:getBuffNextTime(baseTime)C:getPropByName(name)C:increaseDecalPool(amount)C:linkContainers()C:linkProps()C:moveCamera()C:moveTriggers()C:pushBall()C:resetValues()C:setParameters()C:setReferences()C:slowDownCar()C:tpContainers()C:updateValues()C:work()See Also