Creation
- Generate a
PlayerState
class using the BuildTool (We are going to call this example's classPS
) - Include its header into a
Game mode
header file - Call the regular make function
- You have a new player state ready to be used
Usage and theory
The player state class is the only class with no functionality tied
to it, meaning that it only has its necessary events. There are more
plans for the GameState
class for updates in the far
future, but for now it doesn't serve a purpose other than adding
additional events. However, semantically, its usage is for tracking
specific states of a player that are not related to the
Pawn
or PlayerControler
. Here are some
examples:
- K/D ratio
- High score
- Number of items used
- Current party name
Casting
You can use the standard cast function for casting from a generic pointer to it's base pointer type
- Home
- Beginner concepts
- Advanced concepts
- Engine developer and contributor resources