The Daily Click ::. Forums ::. Klik Coding Help ::. anyone know how to make an RPG inventory menu / tech menu?
 

Post Reply  Post Oekaki 
 

Posted By Message

NMasutaa



Registered
  26/12/2004
Points
  301
21st June, 2007 at 17:43:18 -

I need help making a menu that lists what you have in your inventory, the list changing when items are added and removed from it. I also need a menu for techs, and figured that it could be done the same way as an item menu.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
23rd June, 2007 at 11:55:02 -

A really simple way would be to always list every possible item you can have and just make it show 0 if you have none of them.
Much more simple than having to remove items and rearrange the order if an item disappears.

 
.

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
23rd June, 2007 at 13:32:33 -

If i had MMF installed, i could easily make you one.

However, the easiest way would be to use a 3 dimensional array

(x,y,z)

The (x,y) position would be the positions of the inventory screen, and it's value would be the id of the item, and it's z value would be the quantity.

Paired with this, you would have a list object which contains the name of every item you can have in your inventory, off-screen.

You then get the item i.d, go to the appropriate line in the list object, and get the string from it.

 
My signature is never too big!!!

Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
23rd June, 2007 at 16:34:55 -

You can do it with just a one dimensional array, it's not all that much harder.

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
23rd June, 2007 at 16:47:14 -

for a 1 dimensional array, if you didnt want to use String Parser, you'd have to store different bits of information in a large number, but it can't have a preceding 0, so basically you'd have 1, then the information.

Say each bit of information had a range between 1 and 999, and you wanted to store the item id and item quantity

you'd have (1001999,1002001,1003015)

Then you'd have to seperate these using the left$ or right$ mid$ functions.

This would give:
item 1, quantity 999
item 2, quantity 1
item 3, quantity 15

in the inventory list, where obviously you'd have some system to replace item id with it's name.

There are other ways, but I find a 3 dimensional array the easiest way.



Image Edited by the Author.

 
My signature is never too big!!!

Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
23rd June, 2007 at 16:49:49 -

Okay I was thinking of a much easier way but I guess if you want really long numbers you can do that.

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
23rd June, 2007 at 16:52:46 -

It all depends on the type of system you want.

I'd recommend graphical systems use a 3 dimensional array

 
My signature is never too big!!!

NMasutaa



Registered
  26/12/2004
Points
  301
24th June, 2007 at 13:09:11 -

thanks, but after arranging all that, how do you actually load the items so that they're listed in the menu?

 
n/a

NMasutaa



Registered
  26/12/2004
Points
  301
24th June, 2007 at 13:14:38 -

specifically, what I think I really need help w/ is how to check for the item's ID, so that it can be used to get the string from the list object.

 
n/a

NMasutaa



Registered
  26/12/2004
Points
  301
24th June, 2007 at 21:32:21 -

never mind, I've figured it out now. thanks for everything though!

 
n/a

Windybeard Games



Registered
  14/04/2005
Points
  219

You've Been Circy'd!VIP MemberCandy Cane
25th June, 2007 at 09:49:32 -

if you still need help, Radix made me an awsome example of this a while back, a quick search should bring it up, it included, item stacking, drag and drop and allowed you to delete and arrange the items. Its worth a look even if you can do it yourself as it was a really good inventory system.

 
n/a

columbo borgi :C



Registered
  07/12/2003
Points
  296

VIP Member
26th June, 2007 at 08:38:24 -

Antworx, lemme see that

 
:C

Joe.H

Evil Faker

Registered
  19/08/2002
Points
  3305
26th June, 2007 at 09:25:07 -

http://phenex.googlepages.com/Inventory_Engine.zip

 
My signature is never too big!!!

columbo borgi :C



Registered
  07/12/2003
Points
  296

VIP Member
26th June, 2007 at 09:39:10 -

looks awesome

 
:C
   

Post Reply



 



Advertisement

Worth A Click