Inventory?

Non-platform specific questions.

Inventory?

Postby Hblade » Wed Oct 26, 2011 8:08 pm

Hey, how can I make it so that when I pick up an item, it gets added to the inventory? Here are the items I have.
Code: Select all
#define PlayerX SAVEDATA[0]
#define PlayerY SAVEDATA[1]
#define LEVEL SAVEDATA[2]
#define _HPMAX SAVEDATA[3]
#define _MPMAX SAVEDATA[4]
#define EXP SAVEDATA[5]
#define EXPNEXT SAVEDATA[6]
#define PlayerLevel SAVEDATA[7]

#define POTION ITEMS[0]
#define HIGHPOTION ITEMS[1]
#define MAXPOTION ITEMS[2]
#define CANDY ITEMS[3]
#define ANTIDOTE ITEMS[4]
#define ATKUP ITEMS[5]
#define DEFUP ITEMS[6]
#define SPIUP ITEMS[7]
#define AGIUP ITEMS[8]
#define BRONZE_HELMET ITEMS[9]
#define IRON_HELMET ITEMS[10]
#define STEEL_HELMET ITEMS[11]
#define MYTHRIL_HELMET ITEMS[12]
#define SHIRT ITEMS[13]
#define CHAIN_MAIL ITEMS[14]
#define IRON_PLATE ITEMS[15]
#define MYTHRIL_PLAGE ITEMS[16]
#define PANTS ITEMS[17]
#define BRONZE_LEGARMOR ITEMS[18]
#define IRON_LEGARMOR ITEMS[19]
#define MYTHRIL_LEGARMOR ITEMS[20]
#define BOOTS ITEMS[21]
#define BRONZE_BOOTS ITEMS[22]
#define IRON_BOOTS ITEMS[23]
#define MYTHRIL_BOOTS ITEMS[24]
#define SHORT_SWORD ITEMS[25]
#define LONG_SWORD ITEMS[26]
#define STEEL_SWORD ITEMS[27]
#define MYTHRIL_SWORD ITEMS[28]
#define DRAGON_SWORD ITEMS[29]


I want to make it so that like, if you have only 2 items, for example: "Potion, Antidote" There will only be 2 items in the inventory. And can be added. Any idea how to do this? >.> and be able to use the arrows to move to the next selection?
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Inventory?

Postby DollMaster » Wed Oct 26, 2011 8:48 pm

viewtopic.php?f=2&t=10997

Theres a link to some prototypes of mine that I am using. I stitched code together from tutorials and stuff. I think in these all you have to do is add functionality to the items, which I am currently doing in my game. Also got to delete items upon use. The bread heals you, but it does not go away after use. Doing some more planning before I add more junk to it.

EDIT: correction, in this version i did not add bread healing you yet. got to follow skydesigns directions in that thread on how to do that.
DollMaster
 
Posts: 65
Joined: Fri Jun 16, 2006 2:38 am
Score: 2 Give a positive score

Re: Inventory?

Postby Hblade » Wed Oct 26, 2011 9:31 pm

Thanks (=

+1
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest