Hey everyone. I’ve been lurking the forums for a while but haven’t become active yet. I’ve just started getting into UE4 and have really enjoyed it so far, but am having a minor issue. Currently i’m just trying to block out some of the logic for my game in BP’s until I’m more comfortable w/ the way the engine works & will move on to C++ for heavier math functions when I’m more familiar with UE4.
I’ve found a workaround for my problem, but am curious as to what is causing it. When I attempt to cast to my character to get a reference & bind it’s variables to progress bars the cast keeps failing. I’ve seen it done this way in multiple tutorials including the UE4 documentation and can’t figure out why it won’t work in my project. To pass a reference of my character to the HUD blueprint I’ve been having to do this:
This method will also work without the index check if there’s only one instance of the character in the game, but with multiple characters of this type inside the game the index check is required.
What isn’t working is this:
I’m not sure why, but this will not get a proper reference to my character & appears to be failing to cast. This method is shown in the documentation here: https://docs.unrealengine.com/latest/INT/Engine/UMG/QuickStart/2/ and in several tutorials I’ve watched, so there has to be a reason it’s not working inside my project. If anyone knows what would cause the “get player character” function to fail I’d appreciate the help.
Regards,