Hello! I hope you guys can help me out I have found so many solutions to problems I am having here, and I am so grateful!
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!
DS & LH Lua command issue
DS & LH Lua command issue
- Attachments
-
- Screen Shot 2020-12-31 at 10.48.41 AM.png (82.72 KiB) Viewed 2603 times
Re: DS & LH Lua command issue
Hi,
Make sure all quotes are plain double quotes: "
and not special the special opening and closing quotes: “ and ”
Make sure all quotes are plain double quotes: "
and not special the special opening and closing quotes: “ and ”
Re: DS & LH Lua command issue
WHOA THANK YOU SO MUCH!! It worked!!!!
You are such a legend, sir. 10/10 would buy anything from you again.
Thank you so much, and have a wonderful new year!!
You are such a legend, sir. 10/10 would buy anything from you again.
Thank you so much, and have a wonderful new year!!
Re: DS & LH Lua command issue
Glad to help! Happy New Year!