
I am relatively new to Unity, so I am nervous that I am just doing something really stupid, but for the life of me I cannot figure out what I am doing wrong. Hopefully someone can help out!
I want to modify affinity based on conversation choices, and then use the affinity to filter the NPC responses. I set up the 3rd party support for L/H and Dialogue System, and attached the LoveHateLua to the Dialogue Manager. When I start it up, I can see that all of the Lua functions are registering on Start, including ModifyAffinity and GetAffinity.
When I use ModifyAffinity in the script section, I can see that the affinity correctly changes in the Faction Database. However, when I try to use GetAffinity to check the affinity level, it throws an error.
Example:
in the Script section of a dialogue choice: ModifyAffinity("Koko", "Player", -1)
This one will work to modify affinity in the faction.
later, in the Conditions section of a dialogue choice: GetAffinity(“Koko”, “Player”) < 0
This one will not work and throws: Dialogue System: Lua code 'return GetAffinity(“Koko”, “Player”) < 0' threw exception 'Code has syntax errors: ****Looooong list of errors***
*I made sure that the affinity change had registered in the faction database
*I made sure that the GetAffinity function had registered on start
*I checked that an inequality without the function will work to trigger the dialogue (it will)
What else can I try? What am I doing wrong??
Thank you for any insight!