Edit DialogueDatabase Variables Through C#
Posted: Wed Sep 01, 2021 2:21 am
Hello,
My game is a dungeon crawler/open world that you collect items and then sell them at your shop. You set the price for these items, so if they are too high an NPC might try and haggle with you to get the price down. So what I need is to be able to set the item name that the NPC is trying to buy (string) and the price that they are looking to buy it for (float). The way I'm approaching it would look like this in the dialogue editor:
"This [var=itemName] is too much. I would take it for [var=lookingForPrice] though..."
But my question is:
How would I set those variables from a C# script that already holds that data?
I'm sorry if this question has been asked a few times before, but I've been searching for the answer for a while with no luck. Also let me know if there might be a better way to pass data INTO the dialogue database
Thank You!
My game is a dungeon crawler/open world that you collect items and then sell them at your shop. You set the price for these items, so if they are too high an NPC might try and haggle with you to get the price down. So what I need is to be able to set the item name that the NPC is trying to buy (string) and the price that they are looking to buy it for (float). The way I'm approaching it would look like this in the dialogue editor:
"This [var=itemName] is too much. I would take it for [var=lookingForPrice] though..."
But my question is:
How would I set those variables from a C# script that already holds that data?
I'm sorry if this question has been asked a few times before, but I've been searching for the answer for a while with no luck. Also let me know if there might be a better way to pass data INTO the dialogue database
Thank You!