Hi!
On the suggestion of Tony Li, I'm using scriptable objects to track certain variables (specifically skills) with numbers attached to them. These obviously are kept separately from the variables in the dialogue system interface. If I want to simply reference them in conversation conditions or use scripts/sequences to change them how do I go about doing this?
scriptable objects and conditions
Re: scriptable objects and conditions
Hi,
Write C# methods to access those variables. These C# methods will have to act globally -- for example, accepting a character's name:
or operating on the conversation's current conversant:
Then register those methods with Lua.
Write C# methods to access those variables. These C# methods will have to act globally -- for example, accepting a character's name:
Code: Select all
public bool HasLockpickingSkill(string characterName) { ... }
Code: Select all
public bool DoesCurrentConversantHaveLockpicking() { /* check DialogueManager.currentConversant ... */ }
-
- Posts: 13
- Joined: Tue Jun 06, 2023 5:39 pm
Re: scriptable objects and conditions
Thanks for the quick reply, Tony.
Could you go into a bit more detail about how to do this? (specifically writing 'methods') - or if not, direct me to some resource that may help me better understand?
Ultimately, all I really need to do is check if a scriptable objects value is above a certain value in the conditions field.
Could you go into a bit more detail about how to do this? (specifically writing 'methods') - or if not, direct me to some resource that may help me better understand?
Ultimately, all I really need to do is check if a scriptable objects value is above a certain value in the conditions field.
Re: scriptable objects and conditions
Hi,
The link in my previous reply contains instructions and a link to a video tutorial. It does require a bit of familiarity with C# scripting, though, so if you have any questions at all please let me know how I can help.
The link in my previous reply contains instructions and a link to a video tutorial. It does require a bit of familiarity with C# scripting, though, so if you have any questions at all please let me know how I can help.