API ReferenceGE Extensionsflowgraphnodesvehicle Is Player Usable
- **Node Name:** `Is Player usable`
- Node Name:
Is Player usable
- Category:
repeat_instant
- File:
extensions/flowgraph/nodes/vehicle/isPlayerUsable.lua
Checks whether a vehicle is usable by the player. The playerUsable property on a vehicle object determines if the player can enter/drive it.
| Pin | Type | Description |
|---|
vehId | number | ID of the vehicle to check |
| Pin | Type | Description |
|---|
true | flow | Active when the vehicle is player-usable |
false | flow | Active when the vehicle is not player-usable |
| Old Name | New Name |
|---|
vehiId | vehId |
| Method | Description |
|---|
work() | Resolves the vehicle by ID and reads source.playerUsable, outputs to flow pins |
- Resolves the vehicle object from
vehId via scenetree.findObjectById. Does not fall back to the player vehicle if no ID is given.
- Reads the
playerUsable property from the vehicle scene object.
- Sets the
true flow pin when the vehicle is usable and the false flow pin when it is not.
-- In a flowgraph:
-- [Is Player Usable] ← vehId ← [Vehicle ID]
-- → (true) → [Allow entry]
-- → (false) → [Show "vehicle locked" message]
-- Programmatic equivalent:
local veh = scenetree.findObjectById(vehId)
if veh then
local usable = veh.playerUsable
print("Player can use:", usable)
end
obj.playerUsable - scene object property indicating whether the player can enter/drive the vehicle