Closed ericp1337 closed 8 years ago
First, you gotta get hold of the hero entity.
Those hero entities have properties m_hItems.XXXX (XXXX being a number, 0000 for the first item). The value of the property is a "handle", you can get the corresponding item-entity with ctx.getProcessor(Entities.class).getByHandle(theHandleFromTheHeroEntity)
To find out exactly what item it is, the item has a property m_pEntity.m_nameStringableIndex, which is an index into a StringTable (dunno exact name, something along the lines of "EntityNames").
Good luck!
So I noticed that m_hItems.XXXX goes between 0000-0013. If there are only 6 hero backpack slots, what are the other 8 slots used for?
Good question, I'm guessing this is probably to not restrain custom games to 6 items? Or maybe it's the stash?
Thanks! I'll take a look and see what they are. Would be great if the stash is included there.
It was indeed the stash :)
I was wondering how I would go about getting the players items at the end of the game. I looked at the example for getting the end of game stats, but am unsure how to go about getting the list of items a player has in their inventory when the game is finished.
I suspect i have to tell it the field path but am unsure what that would be or how to get it.
Thanks