Skip to content
This repository has been archived by the owner on Nov 12, 2023. It is now read-only.

[U] Player state

Stanislav Vasilev edited this page Feb 21, 2023 · 5 revisions

Creation

  1. Generate a PlayerState class using the BuildTool (We are going to call this example's class PS)
  2. Include its header into a Game mode header file
  3. Call the regular make function
  4. 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

Clone this wiki locally