Mission Editor – Start Trigger
Editor sub-module for configuring **how and where a mission starts**. Supports `coordinates` (world-space position with radius) and `league` (career progress screen) trigger types.
Editor sub-module for configuring how and where a mission starts. Supports coordinates (world-space position with radius) and league (career progress screen) trigger types.
Overview
Manages mission.startTrigger - the type, level, position, rotation, and radius that define where/how a mission is activated. Uses transformUtil for gizmo-based 3D positioning in the viewport.
Class Methods
| Method | Signature | Description |
|---|---|---|
C:init | (missionEditor) | Loads all level identifiers, sorts them for combo display. |
C:setMission | (mission) | Resets fields and transform helper; sets gizmo position if coordinates type. |
C:draw | () | Renders start trigger type combo, level selector, and type-specific UI. |
C:getStartTriggerTransform | () → transformHelper? | Returns the transform helper if current level matches. |
Trigger Types
| Type | Description |
|---|---|
coordinates | World-space sphere trigger with position, rotation, and radius. Draws debug sphere and prism in viewport. |
league | Startable only from the Progress Screen in Career while in a specific level. |
Coordinates Trigger
When type is coordinates:
- Level combo – select which level the trigger belongs to
- Transform gizmo – interactive 3D positioning via
transformUtil - Debug drawing – red sphere at trigger position, directional prism showing facing
- Fields:
pos(vec3),rot(quat),radius(number)
Default Data for New Triggers
{
coordinates = { level = 'gridmap', pos = {0,0,0}, radius = 3, rot = {0,0,0,1} },
league = { level = 'gridmap' },
}Type Switching
When changing trigger type:
- Old data is cached per type in
oldValues - If switching back, cached data is restored
- Level field is preserved across type changes
Usage Example
local stTab = require('extensions/editor/missionEditor/startTrigger')(missionEditorRef)
stTab:setMission(mission)
stTab:draw()
-- Get transform for external tools
local transform = stTab:getStartTriggerTransform()
if transform then
print(transform.pos, transform.rot, transform.scl)
endSee Also
- Mission Editor - Additional Attributes - Related reference
- Mission Editor - Career Setup - Related reference
- Mission Editor - Conditions - Related reference
- World Editor Guide - Guide
Mission Editor – Setup Modules
Editor sub-module for configuring mission **setup modules**: Vehicles, Traffic, and Environment. These define how the mission configures player vehicles, traffic spawning, and environmental conditions
Playbook Attribute Viewer
Editor extension that displays **player attribute values and changes** at each step of a Mission Playbook execution. Includes a multi-series plot.