API ReferenceGE Extensionscareermodules
Career Spawn Points Module
M.dependencies = {'career_career'}
Dependencies
M.dependencies = {'career_career'}Proximity-based spawn point discovery system. Unlocks quick-travel destinations as the player drives within 75m of them. Persists unlocked points per level.
Public API
| Function | Signature | Description |
|---|---|---|
M.isSpawnPointDiscovered | (level, spawnPointName) → bool | Whether a spawn point has been discovered on a level |
M.getUnlockedSpawnpointsData | () → table | Returns all unlocked spawn points {[levelName] → {[pointName] = true}} |
Lifecycle Hooks
| Hook | Purpose |
|---|---|
M.onUpdate | Checks player proximity to undiscovered spawn points every 1 second |
M.onExtensionLoaded | Loads unlocked data from save file |
M.onCareerActive | Reloads data when career becomes active |
M.onSaveCurrentSaveSlot | Writes spawnPoints.json to save directory |
M.onClientStartMission | (stub, no-op) |
Dependencies
career_career- active checkcareer_saveSystem- persistencecareer_modules_linearTutorial- discovery gated behindspawnPointDiscoveryEnabledflagcareer_modules_logbook- logs unlock eventcore_levels- level data and spawn point definitions
Discovery Mechanics
- Distance: 75 meters from spawn point object
- Check interval: Every 1 second (
updateTime) - Gated by: Tutorial flag
spawnPointDiscoveryEnabled - On discovery: triggers
onSpawnPointUnlockedhook, clears raw POI cache
Save Format
Stored at <savePath>/career/spawnPoints.json:
{
["west_coast_usa"] = {
["spawn_garage_01"] = true,
["spawn_gas_station"] = true,
},
-- ...
}Usage Example
-- Check if a spawn point is available for quick travel
if career_modules_spawnPoints.isSpawnPointDiscovered("west_coast_usa", "spawn_garage_01") then
-- show in quick travel menu
endHooks Emitted
| Hook | Data |
|---|---|
onSpawnPointUnlocked | (spawnPoint) - the spawn point data table |
See Also
- quickTravel - Uses discovered spawn points for teleportation