Page 2 of 2
Re: roguelike help
Posted: Sat Mar 22, 2014 10:06 am
by imgifty
Anyone got an idea?
Also does someone know how I would implement jumper with my map?
Re: roguelike help
Posted: Sat Mar 22, 2014 12:08 pm
by deströyer
Conceptually, you can give items an 'inventorySlot'-property, which tells it where it wants to go. For instance, a sword could have sword.inventorySlot = 'weapon'.
You can then have two different types of inventory - the 'equipped gear' inventory and the 'backpack' inventory. The 'equipped gear' inventory cares about the itemSlot-value on the items, whereas the backpack doesn't. The 'weapon' slot in the 'equipped gear' inventory can only receive an item which has inventorySlot = 'weapon', for example.