Hey Tony and everyone
I was wondering if someone knew how to set a condition via playerprefs? i.e. I have 2 nodes and would like to choose path A if PlayerPrefs.GetInt("Choice",1)
Thank you in advance for any advice
O
PlayerPrefs or other script variables as conditions?
Re: PlayerPrefs or other script variables as conditions?
Hi,
You can write a C# method that returns the PlayerPrefs value. Example:
Then register it with Lua so you can use it in conversations' Conditions fields:
You can write a C# method that returns the PlayerPrefs value. Example:
Code: Select all
double GetChoice() { return PlayerPrefs.GetInt("Choice", 1); }