V.0.1.3 Devlog - LH
"Cutscene Confusion"
Author: Liam Hans
Posted on: 07/25/24
THE PROBLEM
This week, I had the daunting task of creating an opening cutscene for our game, explaining the main quest to the player. Seeing as I had never made a cutscene in any engine before, this notion filled me with a great deal of excitement and anxiety. I was very much looking forward to giving our player some context via a cutscene, but had no real idea how hard it might be. Turns out, it's pretty easy, but VERY tedious. Unreal has a rather comprehensive system for making in-engine cutscenes, but you need to control absolutely everything. Which is good for people that want lots of control, but bad for people on a time-budget. All this is to say, making the cutscene took awhile, but went pretty okay. The problem arose when attempting to trigger it. Typically opening cutscenes are triggered when you first play the game. So, I thought, let's just trigger it when we press our Play button. But there were two problems with this scenario: 1. The cutscene would get triggered every single time we pressed the play button, and there was no functionality set up to skip the scene. 2. We have TWO play buttons, one to start the tutorial which leads you in to level one, and then one that leads you straight to level one. This was a problem, and needed to be fixed.
THE SOLUTION
There were many paths I could have taken with problem 1; I could have kept the cutscene playing every time but added a skip button, I could only play the cutscene the first time we boot the game up, or I could just leave it. After some deliberation with the team, I decided on only allowing the cutscene to play the very first time the player boots up the game. We have a save system set up to save player data to a file on your computer, so I just added a bool flag on whether the player has seen the opening cutscene to that save system, and I set it to true as soon as the cut scene starts, and it never gets set back to false. Obviously, to test if this worked, we needed a debug cheat to reset that bool, which I did eventually add, and just like that our first problem was fixed. Regarding our second problem, I needed to ensure that at the end of the cutscene we loaded in to the right level (based on whether we pressed 'Start Tutorial' or 'Start Journey'). Originally, I had an event trigger within our final cinematic shot that would just default to loading the tutorial level, but obviously this would not do. So, after some experimenting and thinking about what I could do to make this cinematic event load the appropriate level dynamically, I decided upon the following process:
I created a Name variable in our MainMenuGameMode that would specify which level to load within this cinematic event trigger:
Then, within our MainMenu level blueprint (which is where we trigger the cutscene) I bound a different event to each button on our main menu. One for if we pressed 'Start Journey' and a different one for if we pressed 'Start Tutorial':
Then, within these events, I set the MainMenuGameMode's LevelToLoadName variable to the appropriate level name, which in the end triggers the proper load level event:
In the end, this worked. Do I 100% love this solution? No, I wish I could have figured out a way to only have one event get called regardless of which button we pressed, and it just set the appropriate LevelToLoadName variable regardless, instead of creating two nearly identical events that only vary in the value they set for the Name variable. But, I had already spent upwards of 10hrs on this cutscene, plus a couple more fixing our first problem, so I had to cut my losses and stick with what worked. Below you can watch an example of our opening cutscene!
Get Plight of the Gods
Plight of the Gods
Fight your inner self to heighten your inner self
Status | Prototype |
Authors | acidwalrusdigital, ilrathCXV (FM), KevinHall14, MysticF0x, Lhans |
Genre | Fighting, Adventure, Role Playing |
Tags | 3D, casting, Fantasy, Magic, melee, Singleplayer, student |
More posts
- Devlog Update: Plight of the Gods is Now Live!98 days ago
- V0.1.3 - KHJul 26, 2024
- V0.1.3-Devlog-ENJul 25, 2024
- v0.1.3 - DevLog - JRJul 25, 2024
- V0.1.2Jul 20, 2024
- V0.1.2 Devlog - LHJul 20, 2024
- V0.1.2 Devlog-ENJul 18, 2024
- V0.1.1 Devlog-KHJul 13, 2024
- v0.1.1 DevLog - JRJul 12, 2024
Leave a comment
Log in with itch.io to leave a comment.