API ReferenceGE Extensionsflowgraphnodescareer
Add Or Remove Player Attribute
- **Name:** `Add Or Remove Player Attribute`
Overview
- Name:
Add Or Remove Player Attribute - Category:
once_instant - File:
lua/ge/extensions/flowgraph/nodes/career/playerAttribute.lua - Pattern: Class-based (
C = {}, returns_flowgraph_createNode(C))
Description
Adds or removes a specified amount of a player attribute (e.g., money) from the current career save slot. Executes once per trigger, with a reset mechanism.
Pin Schema
Input Pins
| Pin | Type | Default | Description |
|---|---|---|---|
add | bool | true (hardcoded) | true adds the amount, false removes it |
amount | number | 0 (hardcoded) | The amount to add or remove |
playerAttribute | string | "money" (hardcoded) | The attribute name |
reason | string | "" | Reason label for the change |
Behavior
work()checks if career is active and the node hasn't already fired. If both conditions are met, callscareer_modules_playerAttributes.addAttributes()with the attribute, amount (negated ifaddis false), and a reason label.- Sets an internal
flagto prevent re-execution untilresetpin or_executionStarted()clears it.
Key APIs Used
career_career.isActive()career_modules_playerAttributes.addAttributes()
Tags
#flowgraph #node #ge #career #playerAttribute
Additional Exports
onNodeReset()
-
color-any- (see source) -
icon-any- (see source) -
description-string- (see source) -
category-string- (see source) -
pinSchema-table- (see source) -
tags-table- (see source)
See Also
- Add To Inventory (Flowgraph Node) - Related reference
- Career Vehicle Select (Flowgraph Node) - Related reference
- Set Tutorial Step (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide