Character Items

How would I make it so you can buy stuff for you character in game for example Armour and have lives?

This is a huge topic (which is probably why no one has commented on it yet) … here’s a very high-level, very generic overview:

You’d probably want some kind of Character class that would include things like their strength, fighting ability, etc.  And in there you could include a Money field and an Armour field (or more generically, maybe an Inventory field).  As the character does good things, you’d add to the Money field (through accessor functions, e.g. Character:addMoney( amount ) ), and when they enter a “store” inside the game they could buy (Character:removeMoney( amount) ) and would gain stuff ( Character:addItem( “armour”, “armour_type” ) ).

Here’s a related post in the forums that includes some code examples:

This is a huge topic (which is probably why no one has commented on it yet) … here’s a very high-level, very generic overview:

You’d probably want some kind of Character class that would include things like their strength, fighting ability, etc.  And in there you could include a Money field and an Armour field (or more generically, maybe an Inventory field).  As the character does good things, you’d add to the Money field (through accessor functions, e.g. Character:addMoney( amount ) ), and when they enter a “store” inside the game they could buy (Character:removeMoney( amount) ) and would gain stuff ( Character:addItem( “armour”, “armour_type” ) ).

Here’s a related post in the forums that includes some code examples: