Hi there, I was ending the inventory system for my 2d platformer. Everything was working fine, except the fact that the inventory wasn't displaying the items that were on the array
here's the cp3 file: drive.google.com/file/d/1rASOf6MunpBQ4swZJ5_BT10fuLKqz0Z-/view
NOTE: the code is at: HUD > Inventory > InventorySetup; And you can test it on the test layout
Develop games in your browser. Powerful, performant & highly capable.
not checked the file yet but for a platformer game - system save and load should be simple and good enough, did you use this method ?
You mean, load by variable or by array?
Under system there are actions for save and load, you can use these to make a save game. It saves everything at once in a state form.
Yeah I used this, but the inventory doesn't displays the items on the array
I meant logic like this construct.net/en/tutorials/savegames-11
Ok i had a look at the file you are referring to loading data from the array when you load into a level. Looks like your condition is wrong in that function should be 'for each inventory slot' I think that's all you need to get going.
I changed to the code below, but it still wrong. On the slots that are on "0", the itemIcon gets spawned, knowing that it doesn't was meant to spawn on empty slots. Also, it still not showing the right items and amount.
Worked it out name should be ItemPosition.At(InventorySlot.SlotID,0)