Announcement

Collapse
No announcement yet.

Retained inventory

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Retained inventory

    How do I have the player retain certain inventory items and other stats and variables between levels, or when the player dies?

    #2
    So if I pick up an item in one level, end the level and load another, I still have that item?
    Or if when I start a new level, I want to have the same amount of ammo that I had when I finished the last level?
    If I just add inventory that inventory is done when the level ends. I can't just use default inventory or even set up the player to receive inventory for a specific level, because the player may or may not have that particular item.

    How can I save particular inventory items or variables between levels?

    Comment


      #3
      you need to setup a save game system.
      there's a UDN gem that explains how to set up such a system, and there's some other example on UDN called Sapitu

      Comment


        #4
        The save system listed in the gems is for saving levels, and while I could adapt it for my needs, It would be a bit like using a brick for a flyswatter.

        This Sapitu looks good though. I guess what I would be doing is creating a special save file invisible to the player, and then it gets saved/loaded with each level change.
        I'll start looking through it to see what I can manage. Thanks!

        Comment

        Working...
        X