If I want to set as a condition the bool from a script outside the Dialogue System, how should I proceed?
I have a public bool IsItemInInventory(string searchedObject) in Inventory.cs, which uses the RPG.Core namespace.
Now I want to only display conversation option 2 if this bool returns true for IsItemInInventory("FireEssence"), i.e. I need the true value of this bool to be a condition.https://appsync.biz/solitaire/ 9apps.ooo/ https://bluestacks.vip/
Getting bool from other script!!!!
-
- Posts: 2
- Joined: Sat Mar 09, 2019 4:31 am
Getting bool from other script!!!!
Last edited by Jacobcullen on Sat Mar 16, 2019 3:04 pm, edited 1 time in total.
Re: Getting bool from other script!!!!
Hi,
To do that, you will use the Dialogue System's Lua functionality. Register IsItemInInventory() with Lua, and then use it in conversation option 2's Conditions field. (See: Registering Functions)
To do that, you will use the Dialogue System's Lua functionality. Register IsItemInInventory() with Lua, and then use it in conversation option 2's Conditions field. (See: Registering Functions)
-
- Posts: 1
- Joined: Mon Feb 03, 2020 11:57 am
Re: Getting bool from other script!!!!
I tried multiple times, with GetComponet and public calling said script, but i cannot access the public bools from this other scripts
Re: Getting bool from other script!!!!
Please post the code you're using to try to access the variables.