.. | ||
activate_signage.md | ||
clear_signal.md | ||
close_portal.md | ||
delay.md | ||
goto.md | ||
hide_pedestal.md | ||
kill_player.md | ||
label.md | ||
load_level.md | ||
open_portal.md | ||
pause_animation.md | ||
play_animation.md | ||
play_sound.md | ||
point_pedestal.md | ||
q_sound.md | ||
README.md | ||
resume_animation.md | ||
rumble.md | ||
save_checkpoint.md | ||
set_signal.md | ||
show_prompt.md | ||
start_cutscene.md | ||
start_sound.md | ||
stop_cutscene.md | ||
teleport_player.md | ||
wait_for_animation.md | ||
wait_for_channel.md | ||
wait_for_cutscene.md | ||
wait_for_signal.md |
Cutscenes
Cutscenes are scripted sequences of steps which can be executed by the game in response to triggers or other cutscenes. Unlike typical usage of the term "cutscene", most do not take control away from the player and are instead more similar to background threads.
Definition
At level export time, level definition C source files are generated using the
Lua scripts in tools/level_scripts/
, initiated by export_level.lua
. Cutscene
information is written using information from each level's associated
YAML file.
In the YAML file, cutscenes are defined in an object property called cutscenes
.
Property names are used to reference cutscenes from triggers or other cutscenes.
Property values are lists of steps to perform.
Steps use the syntax:
STEP_NAME [ARG]...
That is, the step name followed by 0 or more space-separated arguments. The number and type of the arguments is specific to each step type.
For example,
cutscenes:
OPEN_PORTAL:
- delay 5
- rumble 0
- open_portal back_wall 0
ENTERED_TRIGGER:
- set_signal open_door
Multiple cutscenes can be running at once, and triggered cutscenes are stopped after their final step is executed.
Step types
See the pages below for details on specific cutscene steps.
Type | Description |
---|---|
play_sound | Plays a sound and waits for completion |
start_sound | Plays a sound without waiting |
q_sound | Queues a sound to be played on a channel |
wait_for_channel | Waits for a sound channel to be available |
delay | Pauses for a specified duration |
open_portal | Opens a portal at a location |
close_portal | Closes a portal at a location |
set_signal | Changes a signal's default state to set |
clear_signal | Changes a signal's default state to unset |
wait_for_signal | Waits for a signal to become set |
teleport_player | Moves the player to a location |
load_level | Loads the next level |
label | Marker for goto |
goto | Unconditional jump to a label |
start_cutscene | Starts a cutscene |
stop_cutscene | Stops a cutscene |
wait_for_cutscene | Waits for a cutscene to end |
hide_pedestal | Hides pedestals and grants the portal gun |
point_pedestal | Points pedestals at a location |
play_animation | Plays or updates an armature's animation |
pause_animation | Pauses playback of an armature's animation |
resume_animation | Resumes playback of an armature's animation |
wait_for_animation | Waits until an armature is not animated |
save_checkpoint | Creates an autosave |
kill_player | Kills the player |
show_prompt | Displays an action prompt |
rumble | Activates the rumble pak |
activate_signage | Turns on test chamber signs |