This component synchronizes data between the Realistic FPS Prefab player and the Dialogue System's Lua environment.
More...
This component synchronizes data between the Realistic FPS Prefab player and the Dialogue System's Lua environment.
It automatically synchronizes before and after conversations, and you can synchronize manually using SyncFPSToLua() and SyncLuaToFPS().
It uses the following values in the Lua environment:
Actor["Player"].hitPoints
: Current hit points.
Actor["Player"].maximumHitPoints
: Maximum hit points.
Actor["Player"].hungerPoints
: Current hunger points.
Actor["Player"].thirstPoints
: Current thirst points.
- Note: Player Actor Name defaults to "Player", but you can change it if the name of your player actor is different in your dialogue database.
Variable["<weapon-name>"]
(for each weapon): A Boolean (true
or false
) indicating whether the player has the named weapon.
- Example:
Variable["Shotgun"] == true
is true when the player has the shotgun.
- Example:
Variable["Shotgun"] = false
takes the shotgun away from the player.
- If the player name or any weapon names have spaces, those spaces will be replaced with underscores (_) in Lua.
◆ HideHUD() [1/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.HideHUD |
( |
| ) |
|
◆ HideHUD() [2/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.HideHUD |
( |
| ) |
|
◆ LoadPosition() [1/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.LoadPosition |
( |
| ) |
|
◆ LoadPosition() [2/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.LoadPosition |
( |
| ) |
|
◆ OnApplyPersistentData() [1/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.OnApplyPersistentData |
( |
| ) |
|
When the bridge receives the OnApplyPersistentData message, it applies the saved data from the Dialogue System's Lua environment to the player.
Also temporarily disables fall damage; otherwise if we apply a recorded persistent position that's lower than the starting position, the FPSRigidbodyWalker will think we're falling and apply fall damage.
◆ OnApplyPersistentData() [2/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.OnApplyPersistentData |
( |
| ) |
|
When the bridge receives the OnApplyPersistentData message, it applies the saved data from the Dialogue System's Lua environment to the player.
Also temporarily disables fall damage; otherwise if we apply a recorded persistent position that's lower than the starting position, the FPSRigidbodyWalker will think we're falling and apply fall damage.
◆ OnConversationEnd() [1/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.OnConversationEnd |
( |
Transform |
actor | ) |
|
When a conversation ends, sync Lua to FPS.
- Parameters
-
actor | Actor participating in the conversation. |
◆ OnConversationEnd() [2/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.OnConversationEnd |
( |
Transform |
actor | ) |
|
When a conversation ends, sync Lua to FPS.
- Parameters
-
actor | Actor participating in the conversation. |
◆ OnConversationStart() [1/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.OnConversationStart |
( |
Transform |
actor | ) |
|
When a conversation starts, sync FPS to Lua.
- Parameters
-
actor | Actor participating in the conversation. |
◆ OnConversationStart() [2/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.OnConversationStart |
( |
Transform |
actor | ) |
|
When a conversation starts, sync FPS to Lua.
- Parameters
-
actor | Actor participating in the conversation. |
◆ OnDisable() [1/2]
virtual void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.OnDisable |
( |
| ) |
|
|
protectedvirtual |
◆ OnDisable() [2/2]
virtual void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.OnDisable |
( |
| ) |
|
|
protectedvirtual |
◆ OnEnable() [1/2]
virtual void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.OnEnable |
( |
| ) |
|
|
protectedvirtual |
◆ OnEnable() [2/2]
virtual void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.OnEnable |
( |
| ) |
|
|
protectedvirtual |
◆ OnRecordPersistentData() [1/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.OnRecordPersistentData |
( |
| ) |
|
When the bridge receives the OnRecordPersistentData message, it saves the player's Realistic FPS Prefab data to the Dialogue System's Lua environment.
◆ OnRecordPersistentData() [2/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.OnRecordPersistentData |
( |
| ) |
|
When the bridge receives the OnRecordPersistentData message, it saves the player's Realistic FPS Prefab data to the Dialogue System's Lua environment.
◆ SavePosition() [1/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.SavePosition |
( |
| ) |
|
◆ SavePosition() [2/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.SavePosition |
( |
| ) |
|
◆ ShowHUD() [1/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.ShowHUD |
( |
| ) |
|
◆ ShowHUD() [2/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.ShowHUD |
( |
| ) |
|
◆ Start() [1/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.Start |
( |
| ) |
|
◆ Start() [2/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.Start |
( |
| ) |
|
◆ SyncFPSToLua() [1/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.SyncFPSToLua |
( |
| ) |
|
Records the FPS player data into the Dialogue System's Lua environment.
◆ SyncFPSToLua() [2/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.SyncFPSToLua |
( |
| ) |
|
Records the FPS player data into the Dialogue System's Lua environment.
◆ SyncLuaToFPS() [1/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.SyncLuaToFPS |
( |
| ) |
|
Updates the FPS player data with the current values in the Dialogue System's Lua environment.
◆ SyncLuaToFPS() [2/2]
void PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.SyncLuaToFPS |
( |
| ) |
|
Updates the FPS player data with the current values in the Dialogue System's Lua environment.
◆ debug
bool PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.debug = false |
◆ hideHudInConversations
bool PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.hideHudInConversations = true |
◆ playerActorName
string PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.playerActorName = "Player" |
◆ recordCurrentLevel
bool PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.recordCurrentLevel = true |
◆ savePosition
bool PixelCrushers.DialogueSystem.RealisticFPSPrefab.FPSLuaBridge.savePosition = true |
The documentation for this class was generated from the following file:
- D:/Documents/Unity Projects/Dialogue System/Dev/Integration/RFPS Integration/Assets/Dialogue System/Third Party Support/Realistic FPS Prefab/Scripts/FPSLuaBridge.cs