What's the best way to implement cutscenes to a game?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By VillagerWerman

So im making 2D side-scroller and i want to add cutscenes. For example activating speech box with hints on tutorial when players enters specific area or a cutscene before boss fight where player, boss and other npc’s moves by script.
All the tutorials that I found on YouTube do not fit my game.
What is the best way to implement this? Is there any good plugins/tutorials for this or should i make everything from scratch myself?

All the tutorials that I found on YouTube do not fit my game.

Then you should start your question describing what exactly does not fit your preconditions.

sash-rc | 2021-08-22 19:10

:bust_in_silhouette: Reply From: Zylann

What is the best way

There is no best way. If there was, it would be known and documented extensively on YouTube I’m sure.

The real question is how you want yours to be. And it may be using specific elements which can require simple features to assemble together. Every game is different. It’s extremely unlikely that you’ll find a YouTube video fitting exactly what you want for your game. Still, watching some can give you ideas on how to do some of it. If you aren’t experienced in this, don’t try to do everything at once. Start simple, and improve.

From what you describe, I suppose you could make use of Area2D to trigger when the player enters a certain area. Then trigger a game state where input changes from controlling the character to controlling a chatbox instead, or changing to a state where just an animation plays out. This requires a bit of scripting to change states, play stuff, and change input logic accordingly.
Animations can be done withAnimationPlayer, and these can include doing a camera travelling or animating positions.
There are many dialog plugins on the asset library if you’d like a pre-existing system: Godot Asset Library
There are also state machines if you’d like to structure the state changes induced by being in a cutscene, dialog or character gameplay Godot Asset Library