Getting player instances
If you were to test this now, you would see that a value gets created in our pause menu, but the value is 0. This is not correct because our character is supposed to start with 100 HP according to the character's current stats:
The problem occurs because the Field Player that accesses the pause menu never assigns any of our character data to Character Target. We can easily set the proper character target in Blueprint, but we won't be able to assign any of the character data without exposing our added party members to Blueprint. So, we must first head into RPGGameInstance.h
and allow the exposure of our current game data to ...
Get Building an RPG with Unreal 4.x now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.