Created July 1, 2019 by Christopher Lee

A Very Quick Guide on Implementing Gameplay Systems in Unreal Editor 4 Blueprint

A.k.a how to tack code to things that don’t easily allow code to be tacked to them.

I have been messing around with unreal editor since the first year of university. Not because it had anything to do with the bachelor’s degree I was doing, or the master’s degree I am doing now, but because I wanted to help my friends make a game they are making. After the most experienced of the group went to work for a real game company, I took the role of lead programmer, and was the one to direct the way we would implement the various game systems into the engine.

The following is a guide on what you should use to implement any game system in Unreal Engine 4, from my experience. These aren’t hard rules, but they will help you think though all of the limitations of the systems in the engine, before you make the critical mistake of implementing using one system and having to tear it all out and reimplement it using another.

Although I have written this guide for Blueprint, it may also come in useful for understanding how the systems work in C++ too. If you have any suggestions, let me know on Twitter.

What are we trying to do?

The first question you should ask yourself when trying to implement anything is if it should be implemented as a function or an event. Ask yourself: Is the thing you are trying to do reliant on a “latent node”, such as a “Delay” node, or “MoveTo” node? These “latent nodes” take an amount of game time to complete, and therefore can not be included inside a function.

A lot of people mistakenly think that you can’t get information back from an event as it doesn’t have a return node. This is true, but you shouldn’t consider this as part of your answer.

It doesn’t rely on latent nodes (it’s a Function)

Note: something else to consider: if you make a “getter” function, set it to “const” in the advanced dropdown of the function. This firstly makes sure that the getter doesn’t modify state (which is a good idea if you want your code to be clean and make sense) and also, I believe it makes your games run faster (it’s good for compilers?).

It does rely on latent nodes (It’s an Event)