Inventory and Store System - Part 4.2 (Populating the Data)

Sign in to queue

The Discussion

  • User profile image
    Racine Felipe

    I have request/question, how you change the scriptableobject variables in game, like the items in the shop keep up update with the level of the player?!

  • User profile image
    Stacey​Haffner

    @Racine Felipe:

    I am so sorry it's taken me so long to respond! This is a great question. From a general coding standpoint, you can change the scriptable object variables the same way you would any others. (It'll serialize and save the values.)

    From a design perspective, You'd want to have some sort of mechanism that checks the level of the player. Off the top of my head you have a few options. You could update items directly each time the player levels. Alternatively, when the object is being loaded in the UI you could have it check the level of the player and do calculations based on that. Either way, you'll probably need to create some helper methods on the scriptable object. Feel free to e-mail me at dotgame@microsoft.com if you want to talk through some ideas. 

Add Your 2 Cents