Get Current Conversation Fields
Posted: Mon Aug 02, 2021 5:44 pm
Heyo!
I'm currently working on a script that will manage freezing the player, as well as any viewmodel animations that may be needed at the start and end of a conversation (think pulling out a phone/putting it away)
I've added a custom field to the conversation in the database, but I have no idea how to actually get this in-script.
Here's what I got so far:
Any help is appreciated. Thanks!
I'm currently working on a script that will manage freezing the player, as well as any viewmodel animations that may be needed at the start and end of a conversation (think pulling out a phone/putting it away)
I've added a custom field to the conversation in the database, but I have no idea how to actually get this in-script.
Here's what I got so far:
Code: Select all
public void OnConversationStart(Transform actor)
{
bool freezePlayer = DialogueLua.GetConversationField(/* what do I put here */, "FreezePlayer").AsBool;
if (freezePlayer)
PlayerController.LockPlayer();
PlayerController.I.HUDController.HideHUD();
}
public void OnConversationEnd(Transform actor)
{
PlayerController.UnlockPlayer();
PlayerController.I.HUDController.ShowHUD();
}
Any help is appreciated. Thanks!