Item Storage

So the RPG I have been making is based on this tutorial

http://www.penguinprogrammer.co.uk/c-rpg-tutorial/items-and-collectables

I don't entirely understand how the Item storage system is supposed to work. It looks like the array shown is for one item but, there are 3 lines of code that correlate. The author says that this is a repeatable bit of code for each item so.... i'm just completely lost.

Can anyone clarify or offer a better way to program items? The player will have two or three to start and there are 4 battle/health items and one key (for the boss room)

Thank you!

PS, can the story be told just through in-depth narration, or does it require more coding in some way?
Sounds like they are trying to create a psuedo-structure system without making a structure or something...

I would honestly just make a structure for an 'item' and then make an array or those. It would be a lot simpler as you wouldn't have to care about remembering the names of things.
what do you mean by a structure? Like a class or a function? I'm not sure how i would construct items from scratch
Topic archived. No new replies allowed.