Custom Lua Functions for Stats and Modifiers
Posted: Fri Jun 16, 2023 1:00 am
Hi Tony,
Thanks again for the amazing asset--really helping me get off the ground with Unity so much faster.
Quick question, I've seen partial answers in some previously asked topics but have run into a snag on my end:
I'm trying to implement skill checks within conversations based on player stats. I have two C# scripts--one for Character stats and one for potential stat modifiers down the road--and another broader Character C# script I'm using to edit these stats directly in the Inspector.
Ultimately I'm having trouble getting the stat value changes I make in the Inspector to work with a custom Lua Function inside a conversation, and I'm wondering if it may be an error in my stats scripts, or if I'm not registering the C# function correctly or not creating a custom Lua Function correctly in DS--or if it's even possible to tell from your perspective. No noticeable typos I've been able to find across VSCode or Unity either.
This previous topic was helpful: https://www.pixelcrushers.com/phpbb/vie ... hp?p=38729
But haven't had success replicating it fully.
Thanks for your time!
PS, if there's an easier way to store and reference character/player stats directly with DS, would happily use that!
Thanks again for the amazing asset--really helping me get off the ground with Unity so much faster.
Quick question, I've seen partial answers in some previously asked topics but have run into a snag on my end:
I'm trying to implement skill checks within conversations based on player stats. I have two C# scripts--one for Character stats and one for potential stat modifiers down the road--and another broader Character C# script I'm using to edit these stats directly in the Inspector.
Ultimately I'm having trouble getting the stat value changes I make in the Inspector to work with a custom Lua Function inside a conversation, and I'm wondering if it may be an error in my stats scripts, or if I'm not registering the C# function correctly or not creating a custom Lua Function correctly in DS--or if it's even possible to tell from your perspective. No noticeable typos I've been able to find across VSCode or Unity either.
This previous topic was helpful: https://www.pixelcrushers.com/phpbb/vie ... hp?p=38729
But haven't had success replicating it fully.
Thanks for your time!
PS, if there's an easier way to store and reference character/player stats directly with DS, would happily use that!