PixelCrushers.DialogueSystem.UFPS.FPPersistentPlayerData Class Reference

This component works with the PersistentDataManager and UFPS to keep track of a UFPS player's position, health, and inventory when saving and loading games. More...

Inheritance diagram for PixelCrushers.DialogueSystem.UFPS.FPPersistentPlayerData:
Collaboration diagram for PixelCrushers.DialogueSystem.UFPS.FPPersistentPlayerData:

Public Member Functions

void OnEnable ()
 
void OnDisable ()
 
void OnRecordPersistentData ()
 Listens for the OnRecordPersistentData message and records the game object's position and rotation into the Lua Actor[] table. More...
 
void OnApplyPersistentData ()
 Listens for the OnApplyPersistentData message and retrieves the game object's position and rotation from the Lua Actor[] table. More...
 

Public Attributes

string overrideActorName = "Player"
 (Optional) Normally, this component uses the game object's name as the name of the actor in the Lua Actor[] table. More...
 
bool recordPosition = true
 Set true to record the player's position when saving persistent data, or false to skip it. More...
 
bool forceWield = true
 Set true to force the player to wield the weapon after loading a game. More...
 

Detailed Description

This component works with the PersistentDataManager and UFPS to keep track of a UFPS player's position, health, and inventory when saving and loading games.

To use it, add it to the player object.

Member Function Documentation

◆ OnApplyPersistentData()

void PixelCrushers.DialogueSystem.UFPS.FPPersistentPlayerData.OnApplyPersistentData ( )

Listens for the OnApplyPersistentData message and retrieves the game object's position and rotation from the Lua Actor[] table.

◆ OnDisable()

void PixelCrushers.DialogueSystem.UFPS.FPPersistentPlayerData.OnDisable ( )

◆ OnEnable()

void PixelCrushers.DialogueSystem.UFPS.FPPersistentPlayerData.OnEnable ( )

◆ OnRecordPersistentData()

void PixelCrushers.DialogueSystem.UFPS.FPPersistentPlayerData.OnRecordPersistentData ( )

Listens for the OnRecordPersistentData message and records the game object's position and rotation into the Lua Actor[] table.

Member Data Documentation

◆ forceWield

bool PixelCrushers.DialogueSystem.UFPS.FPPersistentPlayerData.forceWield = true

Set true to force the player to wield the weapon after loading a game.

Some custom weapons won't aim properly unless they've played the wield animation.

◆ overrideActorName

string PixelCrushers.DialogueSystem.UFPS.FPPersistentPlayerData.overrideActorName = "Player"

(Optional) Normally, this component uses the game object's name as the name of the actor in the Lua Actor[] table.

If your actor is named differently in the Lua Actor[] table (e.g., the actor has a different name in Chat Mapper or the DialogueDatabase), then set this property to the Lua name.

◆ recordPosition

bool PixelCrushers.DialogueSystem.UFPS.FPPersistentPlayerData.recordPosition = true

Set true to record the player's position when saving persistent data, or false to skip it.


The documentation for this class was generated from the following file: