API ReferenceGE Extensionsflowgraphnodesui
Set UI Race Recovery (Flowgraph Node)
- **Node Name:** `Set UI Race Recovery`
Overview
- Node Name:
Set UI Race Recovery - Category:
repeat_instant - File:
extensions/flowgraph/nodes/ui/raceRecoveriesUsed.lua - Author: BeamNG
Sets the UI recovery counter to show how many recoveries the player has used. Supports both numeric and custom string display. Clears when no value or no flow is active.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
cur | number / string | Number of recoveries used, or a custom string |
max | number | Max number of recoveries available |
How It Works
work()- Called every frame:- If
curis set and flow is active:- If
curis a string: passes it directly toguihooks.trigger('RaceRecoveryCounterSet', str). - If
curis a number andmaxis set: formats as"Recoveries Used: cur / max". - If
curis a number withoutmax: formats as"Recoveries Used: cur".
- If
- Otherwise: triggers
guihooks.trigger('RaceRecoveryCounterReset')to clear.
- If
Lua Code Example
-- Show recoveries with max:
guihooks.trigger('RaceRecoveryCounterSet', "Recoveries Used: 2 / 5")
-- Show recoveries without max:
guihooks.trigger('RaceRecoveryCounterSet', "Recoveries Used: 3")
-- Custom string:
guihooks.trigger('RaceRecoveryCounterSet', "No recoveries left!")
-- Clear:
guihooks.trigger('RaceRecoveryCounterReset')Key Dependencies
guihooks.trigger('RaceRecoveryCounterSet', str)- Sets the recovery counter textguihooks.trigger('RaceRecoveryCounterReset')- Clears the recovery counter
See Also
- Medal / Auto Medal (Flowgraph Node) - Related reference
- Clear Messages (Flowgraph Node) - Related reference
- Context Translation (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide