maza
Nov 8th, 1999, 11:49 AM
Hello!
I've found one problem during proramming my game.
I found out that i don't know how to make inventory for my game... Can anyone help me?
Thanks!
darkelf
Nov 9th, 1999, 08:53 PM
There are different ways you could go about doing this. It depends on whether you want a windows style, drag-n-drop interface, a very basic text like interface, or some other interface.
As far as having a drag-n-drop interface, these are NOT easy to program. I have been experimenting with one for some time, and it is a real pain. While it is the best for the user and has the lowest learning curve, it can be a real pain in the programmer's neck.
It's easiest to put your whole inventory on one form (don't mess with MDI forms... eech). This way you can watch what the user is doing easier. Check if the user clicks on one item's box, and then set a variable flag for it. Then have the destination check this flag when the user releases the mouse over it.
Having a 'paper doll' type inventory for a RPG is the nicest way of doing it for the user. Have a picture of the character, then have some boxes on the form for their backpack to hold items. Make the user able to drag an item (a piece of Armor..) onto the paper doll, and then make this change to the paper doll.
Hope this gives you some ideas!