A small but effective cutscene addon for the godot game engine
The Cutscene is basically an autoload that is always available. When a cutscene is played the scene tree gets paused.
The provided cutscene will be added as a child to the cutscene autoload. The cutscene autload itselt has it's pause_mode
set to Node.PAUSE_MODE_PROCESS
. This way the cutscene is playing while the main scene is paused.
Just copy the two files Cutscene.tscn
and Cutscene.gd
into your project. Then add the scene file as an autoload
in the project settings. That's all you need to do.
This pauses the current scene and displays the cutscene.
Arguments:
scene: Node
The scene that should be played. Has to be an instance of Node.
Example:var scene = load("res://path/to/scene.tscn") Cutscene.play(scene.instance())
This pauses the cutscene. Attention! If you pause your cutscene, you wont be able to resume it from within
your cutscene (as it is paused). You may want to set a pause_mode
in your cutscene to process
to be able to unpause.
Resume playing the cutscene.
This toggles the pause/resume of the cutscene. The same warning as for Cutscene.pause()
applies here.
Stops the cutscene and resumes the scene that was active before the cutscene was started.
Indicates if the cutscene is playing or paused
The currently active Cutscene. If no cutscene is active this is null
.
I seperated this from an addon I wrote for my space game project. However it works on it's own. If there are any questions please open an issue.