Creating a Linear Story Path

I started working on a game that follows a linear story path, but I don’t know how to implement the system to make it work. The game is going to work on checkpoints and objectives. Basically, once you complete an objective, you move onto the next checkpoint

My current idea for this system is to have it run on the persistent level’s level blueprint and call functions for checkpoints, but the problem is that I can’t call the specific checkpoint function based on the variable. Issues I think I’ll run into is that I can’t break down checkpoints into multiple parts because I won’t be able to identify when something ends to move to another point in the checkpoint, and the game won’t be able to reload to a certain checkpoint later in the game.

Any ideas or suggestions or much appreciated. Thank you.

Level blueprints shouldn’t really contain game logic. They are there to “animate the birds” or “make the waterfall splash” or whatever – small ambient things really tied to the basics of the level geometry, not the game play.

You could put gameplay progression in a bunch of places. The two most obvious candidates are GameMode, or PlayerState. GameMode is server-side only, PlayerState can be replicated. I’d probably use PlayerState.

I’d probably make the PlayerState contain a Set of Objectives, where an Objective could just be a string/name/tag, or could be something slightly fancier.

Then, the Checkpoint actors, could detect when a player begins overlap, and check the PlayerState for whether their particular Objective is already in the PlayerState, and if it isn’t, determine that the player achieved the Objective, and add it to the PlayerState, and play whatever effects need to be played.

If you need logic – only count a checkpoint when player holds a Blue Key, or whatever – then run that logic as part of the begin-overlap handler, after you check whether the objective has already been completed.

2 Likes

Thanks for the advice. As a beginner, stuff like this helps to understand the engine.