CutsceneVignettes

Goals

Show black bars at the top and bottom of the screen to separate moments that are not playable. Though you still interact with dialogues on them.

How it works

It's a scene with two black ColorRect, that are animated by an AnimationPlayer.

It is inside the HUD scene, but it's not controlled by the Controller and the HUDStates, because it has an incompatibility with the DialogueState. Cutscenes will most likely use dialogue, and can do anything else realy. We can move the player, we might want to animate a menu, and any of these actions, but mainly, starting a dialogue, will change the HUDState and go out of the CutsceneState into DialogueState, making the Vignettes close.

So they live in the HUD scene because this way it's better to place it over or below other HUD elements, for example, above life bar, but below dialogue boxes. But to control them, you have to use two events, and it should be used case by case, depending on each cutscene's needs.

The events are:

  • cutscene_vignette_opened
  • cutscene_vignette_closed

To change the size of the black bars, just edit the margins in the show and hide animations in the scene's AnimationPlayer.

With what script it communicates

Just the Events script.