API ReferenceGE Extensionsflowgraphnodesutil
Get Level Data (Flowgraph Node)
- **Node Name:** `Get Level Data`
Overview
- Node Name:
Get Level Data - Category:
once_instant - File:
extensions/flowgraph/nodes/util/getLevelData.lua
Gets information about the currently loaded level (name, directory, and full path).
Pin Schema
Output Pins
| Pin | Type | Description |
|---|---|---|
devName | string | Developer name of the level (folder name) |
directory | string (hidden) | Directory path for the level |
path | string (hidden) | Full path of the level's mission file |
Internals
Key Methods
| Method | Description |
|---|---|
work() | Retrieves mission filename, extracts directory and dev name |
How It Works
- Calls
getMissionFilename()to get the full path of the current level's mission file. - Uses
path.split()to extract the directory portion. - Parses the directory string with a pattern
(.*/)(.*)/to extract the level's folder name asdevName. - Outputs all three values as strings.
Usage Example
-- Get the current level name for conditional logic:
-- [Get Level Data] → devName → [String Compare] == "gridmap_v2"
-- → true → [Enable GridMap Features]
-- Use the directory for file operations:
-- [Get Level Data] → directory → [Concat String] + "custom_data.json"
-- → [Load File]Key Dependencies
getMissionFilename()- engine function returning the current level's mission file pathpath.split()- path utility for splitting file paths
See Also
- Route Distance (Flowgraph Node) - Related reference
- Closest Road (Flowgraph Node) - Related reference
- Custom Lua (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide