[SOLVED] how do you access inventory objects by index?

Started by Monsieur OUXX, Thu 16/08/2018 15:09:17

Previous topic - Next topic

Monsieur OUXX

EDIT: (that's frustrating, lately I find the solution to my problems the exact second after I post and it's too late to take it back)
Solved: array inventory does not exist until you create at least one inventory item in the editor.

Spoiler

Um, that's embarrassing for me: how do you do inventory[id] in the latest AGS? I can't find array inventory anywhere. I tried the help, I tried player.inventory, game.inventory...
[close]
 

Crimson Wizard

This is a known issue, because AGS script cannot declare static array of 0 size. The only way to solve this for the future is to declare array property and use that instead (e.g. Game.InventoryItems[]).

SMF spam blocked by CleanTalk