|
Post by Haradan on Aug 5, 2019 5:59:59 GMT
Hello! Help to understand the hierarchy of scripts in the Item Manager. I need to add a weight parameter for each item, but I just can’t figure out in which script to do this. Is "vItemDrawer" suitable for this? Or can you advise something about this? Thank!)
|
|
|
Post by Invector on Aug 6, 2019 0:41:05 GMT
You can use the ItemAttribute of your ItemListData, check how the Health works on any demo scene. Basically, the Item Potion contains an Attribute called Health and we use that attribute with the ItemManager Attribute Events (it's located in the inspector), so every time this item is used, we called the method AddHealth() and pass the attribute Health.
You can do something similar to check the weight of your items
|
|
|
Post by Haradan on Aug 6, 2019 2:38:59 GMT
Thanks for the advice!) Checked, everything seems to be good, I will do as you said. But there is still a question on the Item Manager. I have to do the translation of all the texts and in particular in the inventory. Tell me how to get to the name and description of the subject through a script? And I need to do this at the start of the scene, for all items.
Or to paraphrase - help me to change the name of the specific subject at the start of the scene from the script.
Thanks again!)
|
|
|
Post by Invector on Aug 6, 2019 18:21:24 GMT
Hmmm I think (it's just a theory ok) that you could add a custom script where the inventory displays the text information (DescriptionTitle & DescriptionContent), this script would access the text and modify based on what language you're running the game
|
|
|
Post by Haradan on Aug 7, 2019 2:50:32 GMT
Thank you) So I have to do an add-on, but there's nothing to be done. If everything works out, I'll post the script here.
|
|