This tutorial walks you through building a small but complete mission with events, waypoints, messages, and a briefing. It assumes you have read the Quickstart. Budget about 30 minutes.
The mission we are building: the player escorts a friendly transport along a waypoint route to rendezvous with a friendly capital ship. Hostile fighters arrive shortly after the mission starts. If the transport completes its route, the mission succeeds.
Before placing anything, sketch out what the mission needs:
Knowing this upfront prevents building yourself into a corner. You will still adjust things as you go and that is normal.
Open a new mission. The player ship is already there. Select it and click Form Wing, name the wing Alpha. Move Alpha 1 to roughly 0, 0, -2000 using the Object Orientation Editor.
Place the friendly transport near the origin. Open the Ship Editor, name it Transport 1, set its team to Friendly, and set its initial velocity to 0. It will start stationary and move when given orders.
Place a friendly capital ship some distance away at the end of where the transport's route will go. Name it Command Ship and set it to Friendly. Open its Ship Editor and click Flags to open the Ship Flags subdialog. Enable Protect Ship. This tells hostile AI not to target or attack it, making it a safe destination for the transport to reach. Velocity 0 is fine here too.
Place two hostile fighters somewhere off to the side. Select both, click
Form Wing, name the wing Epsilon, set team to
Hostile. Open the Arrival / Departure tab in the Ship Editor for
each Epsilon ship and set arrival location to Hyperspace. Leave
the arrival cue as true for now.
In the Other dropdown on the toolbar, select Waypoint, then Ctrl+Alt+click in the viewport to lay out a short route from the transport's position toward the Command Ship. Three or four points is plenty. Open the Waypoint Editor and name the path Transport Route.
Open the Ship Editor for Transport 1, go to Initial Orders, and set its initial goal to Waypoints Once › Transport Route. The transport will fly the route once from start to finish.
Save and test. The transport should start moving along the route.
Open Editors › Mission Events. Click Add event and name it Epsilon Arrives. Set its Condition SEXP to:
(has-time-elapsed 30)
No action is needed in this event. It acts purely as a named trigger that other things can reference.
Now go back to the Ship Editor for each ship in Epsilon wing. In the Arrival / Departure tab, change the Arrival cue SEXP to:
(is-event-true-delay 0 "Epsilon Arrives")
This way all of Epsilon's ships key off the same named event. If you want to change the delay later, you only need to edit the event's condition in one place.
Save and test. The first 30 seconds should be quiet, then Epsilon jumps in.
Messages are created and sent from the same
Mission Events editor. On the right
side of the dialog, click Add under the message list to create a
new message. Give it the name Epsilon Inbound and write a short line of
text such as "Hostile fighters inbound! Protect the transport!" Set a
sender if desired, or leave it as <mission>.
Now create a new event and name it Epsilon Arrival Message. Set its Condition to:
(has-arrived-delay 0 "Epsilon 1")
In the Actions tree, add a send-message SEXP and
select Epsilon Inbound as the message. Leave the priority at
Normal.
Save and test. The message should appear on screen as Epsilon jumps in.
Open Editors › Mission Goals. Add a primary goal:
(are-waypoints-done-delay 0 "Transport 1" "Transport Route")Add a secondary goal for destroying Epsilon wing if you like. See SEXPs for an overview of how conditions are built.
Write the briefing now. Be creative and give the player a reason to protect the transport from Epsilon wing.
Open Editors › Briefing. Build two stages:
| Stage | Camera | Text |
|---|---|---|
| 1 | Wide view of the whole scene | Explain the mission: escort the transport safely to the Command Ship. |
| 2 | Closer on the transport's route | Warn that hostile fighters are expected; the player must intercept them while keeping the transport moving. |
For each stage, position the briefing map camera, add icons for the relevant ships using Make icon from ship, and type the stage text at the bottom. See the Briefing Editor help for full details. Set the Music track at the top of the dialog.
Save and walk through the briefing before launching to check camera positions and icon placement.
Open Editors › Debriefing. Add two stages:
| Stage | Usage formula | Text |
|---|---|---|
| Success | (are-waypoints-done-delay 0 "Transport 1" "Transport Route") |
The transport completed its route. Commend the player. |
| Failure | (is-destroyed-delay 0 "Transport 1") |
The transport was lost. Acknowledge the failure. |
Assign music tracks for success and failure in the Debriefing music section.
Save and run a full play-through. Check:
are-waypoints-done-delay on an earlier
waypoint as the trigger.