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
Route Distance (Flowgraph Node)Closest Road (Flowgraph Node)Custom Lua (Flowgraph Node)Distance Between (Flowgraph Node)Waypoints Distance (Flowgraph Node)File Exists (Flowgraph Node)Get First Element of Table (Flowgraph Node)Get Level Data (Flowgraph Node)Get Map Objects IDs by DynField (Flowgraph Node)Get Table Value By Key (Flowgraph Node)GHOST (Flowgraph Node)Hide Loading Screen (Flowgraph Node)Color HSV (Flowgraph Node)Line Point From Xnorm (Flowgraph Node)Load Level (Flowgraph Node)Load Project (Flowgraph Node)On Menu (Flowgraph Node)Perlin Noise (Flowgraph Node)Pop Action Map (Flowgraph Node)Get Project InfoPush Action MapRandom ColorRandom NumberRandom QuaternionRandom VectorRoad PropertiesGet Navgraph RouteRoute PositionTemplate NodeTimeTimed SequenceTo NumberTo StringWorld Editor Open

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 Extensionsflowgraphnodesutil

On Menu (Flowgraph Node)

- **Node Name:** `On Menu`

Overview

  • Node Name: On Menu
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/util/onMenu.lua

Detects when the ESC/pause menu is open or closed, providing both continuous state and one-shot impulse outputs.

Pin Schema

Input Pins

PinTypeDescription
resetflow (impulse)Resets the impulse output pins

Output Pins

PinTypeDescription
openflowActive while the menu is open
closeflowActive while the menu is closed
onOpenedflow (impulse, hidden)Fires once when the menu opens
onClosedflow (impulse, hidden)Fires once when the menu closes
openOrClosedbool (hidden)Boolean reflecting the open state

Internals

Key Methods

MethodDescription
reset()Resets lastState to "none"
_executionStarted()Calls reset()
work()Checks menu state each frame, updates outputs and fires impulses on transitions

Menu Detection

Uses core_input_bindings.getMenuActionMapEnabled() combined with a not core_gamestate.loading() check to determine if the ESC menu is open.

How It Works

  1. Each frame, checks if the menu action map is enabled and the game is not in a loading state.
  2. Sets open/close flow pins and the openOrClosed boolean to reflect current state.
  3. Compares against lastState to detect transitions:
    • "none" → "opened": fires onOpened impulse
    • "opened" → "closed": fires onClosed impulse
  4. Impulse pins are reset to false on the next frame after firing.
  5. The reset input pin allows manually resetting the state tracking.

Usage Example

-- Pause game systems when menu opens:
-- [On Menu] → onOpened → [Pause Timer]
--           → onClosed → [Resume Timer]

-- Block input while menu is active:
-- [On Menu] → open → [Disable Player Controls]
--           → close → [Enable Player Controls]

Key Dependencies

  • core_input_bindings.getMenuActionMapEnabled() - checks if the menu action map is active
  • core_gamestate.loading() - checks if the game is in a loading state

See Also

  • Route Distance (Flowgraph Node) - Related reference
  • Closest Road (Flowgraph Node) - Related reference
  • Custom Lua (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Load Project (Flowgraph Node)

- **Node Name:** `Load Project`

Perlin Noise (Flowgraph Node)

- **Node Name:** `Perlin Noise`

On this page

OverviewPin SchemaInput PinsOutput PinsInternalsKey MethodsMenu DetectionHow It WorksUsage ExampleKey DependenciesSee Also