Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

UE5.1: Input Mapping for non-player blueprints

Being tasked with creating a tutorial for Heroes' Blunder, I severely underestimated the task at hand. Initially my design process was to store data on the Player and reference that data to progress through the tutorial. After getting an initial prototype operational, we discovered that this was inefficient and I needed to refactor and decouple this into a blueprint that was specific to the room in which the player spawns. Following tutorials online explained that there were events that were easy to hook into for Input Actions, so I went ahead and started on swapping the system over. Little did I realize that this would lead me on a 6 hour quest of chasing my tail until figuring out that I had missed a critical piece of information that no tutorial I found explained!


The information I was missing is that by default a blueprint that is not attached to a player simply does not actually automatically bind to these events, even though the blueprint editor will allow you to add the event and create code pathways from them. The critical piece of the puzzle that was missing was in the Input section of the blueprint, there is a dropdown for Auto Receive Input, in which you can select a player (which is defaulted to Disabled).


To resolve this issue, I needed to swap this to Player 0 (as we only have a single player in Heroes' Blunder). Immediately all of my blueprint work came to life!

Afterwards in review of the scenario we as a team hypothesized several reasons for this. My first thought was optimization so that the event isn't being called unless specifically enabling the functionality. One of our other developers also hypothesized it may be something related specifically to the internal multiplayer functionality of Unreal 5.1 not knowing which player to be linking to by default, so defaulting to Disabled would avoid any erroneous results.

All-in-all, this was a valuable learning experience despite the time sink that it became. This information did not appear to be commonly referenced most likely due to most people not encountering such a situation where they need to capture Input Action events outside of the player, therefore not being covered in tutorials on the subject.


author: Clinton Butler
Posted on 5/5/2023

Support this post

Did you like this post? Tell us

Leave a comment

Log in with your itch.io account to leave a comment.