This component synchronizes data between the Realistic FPS Prefab player and the Dialogue System's Lua environment.
More...
|
void | Start () |
|
void | OnConversationStart (Transform actor) |
| When a conversation starts, sync FPS to Lua.
|
|
void | OnConversationEnd (Transform actor) |
| When a conversation ends, sync Lua to FPS.
|
|
void | OnRecordPersistentData () |
| When the bridge receives the OnRecordPersistentData message, it saves the player's Realistic FPS Prefab data to the Dialogue System's Lua environment.
|
|
void | OnApplyPersistentData () |
| When the bridge receives the OnApplyPersistentData message, it applies the saved data from the Dialogue System's Lua environment to the player.
|
|
void | SyncFPSToLua () |
| Records the FPS player data into the Dialogue System's Lua environment.
|
|
void | SyncLuaToFPS () |
| Updates the FPS player data with the current values in the Dialogue System's Lua environment.
|
|
void | HideHUD () |
| Hides the HUD.
|
|
void | ShowHUD () |
| Shows the HUD.
|
|
void | SavePosition () |
|
void | LoadPosition () |
|
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.