Module example_cutscene

Showing off callbacks available in the cutscene and brief explanations.

You are not required to define anything you aren't using. Leave callbacks global to automatically detect it on c# side. This assumes you know your way around Lua, if you don't then please consider reading the Lua PIL.

Setting up in map editor

In the case of this cutscene, the filename for the entity field is "Assets/LuaCutscenes/example_cutscene". Please use your own folders for your own cutscenes, like any other Celeste asset collisions can happen.

Using C# in cutscene

Any imports from C# can be done with prefixing # in the require string. For example `local celeste = require("#Celeste")`.
Check out helper_functions.lua for examples on C# interaction.

Functions

onBegin () Coroutine that is called when the cutscene starts.
onEnd (room, wasSkipped) Callback for when the cutscene ends.
onEnter (player) Callback for when a player enters the trigger.
onStay (player) Callback for when a player stays in the trigger (once per frame).
onLeave (player) Callback for when a player leaves the trigger.


Functions

onBegin ()
Coroutine that is called when the cutscene starts. This invloves stuff like walking, jumping, displaying text boxes, etc.

onEnd (room, wasSkipped)
Callback for when the cutscene ends. Function, no yielding actions allowed. That means no walking, waiting etc. Only "clean up" actions.

room #Celeste.Level
Current room.
wasSkipped bool
If the cutscene was skipped.
onEnter (player)
Callback for when a player enters the trigger. Only works as long as the cutscene is running.

player #Celeste.Player
The player that entered the trigger.
onStay (player)
Callback for when a player stays in the trigger (once per frame). Only works as long as the cutscene is running.

player #Celeste.Player
The player that is staying in the trigger.
onLeave (player)
Callback for when a player leaves the trigger. Only works as long as the cutscene is running.

player #Celeste.Player
The player that exited the trigger.
generated by LDoc 1.4.6 Last updated 2023-08-05 11:56:50