Creating a quest system and other gameplay bits

This was the most complex gameplay mechanic I implemented into my game but the process taught me so much about working with the UE5 blueprints (namely, parenting, and functions, binding, widget animations) I almost wish I started with it first.

Quests System

I decided to build this because I wanted a way to keep track of all the triggers in the scene so I could create a way to transition to the next level in the game.
I began by creating 2 parent classes to hold the “objectives” of a quest and then the “quests.” themselves. and, of course, a widget to design it’s appearance, keeping things very simple. It took a lot of time and I needed to tweak a lot of stuff to suit my needs but this tutorial series helped me a LOT genuinely one of the best tutorials I’ve encountered in my life.

I then wanted to implement a way to load the next level if a player had completed all the quests.

I initially tried to use a counting system that added 1 to a variable each time a memory was triggered, then I compared that value to the number of triggers available, telling the engine to load the next level if the variable was equal to said number. However, this didn’t work very well; sometimes there would be multiple numbers added to the counter. To combat this, I added a “destroy actor” node to the trigger boxes so they would be deleted after being triggered,, but that caused the system to stop working altogether so I tried something else.

After strengthening my knowledge of how to use the “cast” system in UE5 my new strategy was to attempt to access the “incomplete” variable in my quest system, which keeps track of whether a quest has been completed or not.

I then checked that value against a branch (which is the UE5 version of an IF statement) and if result was true go to the next level. This worked well at first. When I was just testing it with one quest but when It came to adding all four it just didn’t work and I’m still stumped at what is going wrong.

insanely chaotic BP but there is a method to the madness.

The good news is using this system I was able to create notifications and a sound effect appear anytime a quest had been completed.

Leave a Reply

Your email address will not be published. Required fields are marked *