Player - Crucial-Experiment/HelloNeighborGamesRemake GitHub Wiki

Player

Main game character is represented by a Character type object called BP_Player. This object is responsible for controlling movement, performing actions, and interacting with elements of the game environment, implementing the basic gameplay mechanics.

Public variables

  • Model (Enum) — defines the model of the game character. The available values are listed in the section Enums and Structures
  • Can a player crash to death? (Boolean) — indicates whether a player can die in a fall from a great height
  • Walk Speed (Float) — the player's movement speed when walking
  • Run Speed (Float) — the player's movement speed when running
  • Crouch Speed (Float) — the player's movement speed in crouch mode

Functions

  • Get Inventory — returns a list of all objects in the player's inventory as an array of objects of type BP_Object
  • Get Item — returns the object that is currently in the player's hands. The type of the returned object is BP_Object
  • Update Player Mesh — updates the game character model. Takes a value of type PlayerModel_Enum (see section Enums and Structures)
  • Load Save Value — loads the player's settings from the save file
  • New Field Of View — updates the Field of View value (viewing angle) to the specified value
  • Set Field Of View Back — returns the Field of View (viewing angle) to its initial position

Events

  • Left Mouse Button — player pressed the left mouse button
  • Right Mouse Button — player pressed the right mouse button
  • Use Keyboard Button — player pressed the E button (or another one specified for InputAction Use)
  • Out Trap — player was released from the trap