Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

HBGames

Asdfghjkl I should be able to do this by now, but I can't(I've been editting scripts all day, to absolutely no success :|).

Basically, I want to be able to store a copy of the player's inventory at a point in time, then change the player's inventory to the stored version at a later point in time. So far, my messing around has got me to these 2 snippets;

in one common event
Code:
item = $game_party.items

$inventory = item
and in another common event
Code:
item = $inventory

$game_party.items = item

However, when I run this, the next time anything happens involving $game_party.items, the game crashes with the error "Script Game_Party line 52: NoMethod Error / undefined method "keys" for array blahblahblah"
I can't work out how to do this. Help please?

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top