Hey Toni!
Hope you are well mate,
so I've built a system where im storing quest data on a webserver which im pulling in & then parsing to strings etc at runtime which all works fine.
What im looking to do is modify the conversation tree from dialogue system which we are using with a quest machine backend, essentially i want to be able to pull in those dynamic fields we pulled from the server.
So for example i could have a line like this "Hi, [USERNAME], Welcome to [Game Name]" etc etc
any ideas?
Load Conversation line dynamically from Server
-
- Posts: 19
- Joined: Tue Jan 01, 2019 12:53 am
Re: Load Conversation line dynamically from Server
Hi,
Use Dialogue System variables. You can set them at runtime using DialogueLua.SetVariable():
Use Dialogue System variables. You can set them at runtime using DialogueLua.SetVariable():
Code: Select all
// C# code:
DialogueLua.SetVariable("USERNAME", "Joshua");
DialogueLua.SetVariable("GameName", "The Awesome Game");
- Dialogue Text:: "Hi, [var=USERNAME], Welcome to [var=GameName]"
-
- Posts: 19
- Joined: Tue Jan 01, 2019 12:53 am
Re: Load Conversation line dynamically from Server
Awesome and does that get called from the script field in the dialogue editor, or does it get called from just a C# script on the conversation actor?
Re: Load Conversation line dynamically from Server
From a C# script. I'm assuming you'd set those variables before starting the conversation.