API ReferenceGE Extensionsutil
Booster
Simple trigger-based booster that applies an upward impulse to vehicles entering a trigger zone.
Simple trigger-based booster that applies an upward impulse to vehicles entering a trigger zone.
Overview
util_booster provides a single trigger callback that, when a vehicle enters a trigger zone, queues a Lua command on the vehicle to activate a boost via the vehicle-side core_booster extension.
Extension path: lua/ge/extensions/util/booster.lua
Exports (M)
| Function | Signature | Description |
|---|---|---|
trigger | (data) | Called by trigger zones; boosts the vehicle on enter. |
Internals
Trigger Callback
When trigger(data) is called with event type 'enter':
- Resolves the vehicle via
getObjectByID(data.subjectID). - Queues a Lua command on the vehicle:
extensions.core_booster.boost(vec3(0,0,1), 0.01).
The boost direction is straight up (0,0,1) with a duration of 0.01 seconds.
Note: The code references a global
eventvariable rather thandata.event, which may be a legacy pattern.
How It Works
- Place a trigger zone in the level editor.
- Assign
util_boosteras the trigger handler. - When a vehicle enters the zone,
trigger()fires and sends a boost command to the vehicle's Lua VM.
Lua Examples
-- Manually trigger a boost on vehicle entering a zone
extensions.util_booster.trigger({subjectID = vehicleId})
-- The vehicle-side command that gets queued:
-- extensions.core_booster.boost(vec3(0,0,1), 0.01)Additional Exports
M.trigger- (undocumented)