Creating an inventory system menu

Can anybody show me how to create an inventory system so i can pick up items and press a key to get rid of the inventory menu

I wish I had an answer. Ironically I am doing the exat same thing at the moment. I think I have it figured out, but it is no easy task.

??? wha tdo you mean like if you press “i” a inventory menu come up and if you press “i” again if disapears?

I think that’s what he means but also how to make things show up in there.

Say he runs over a ‘sandwich’ and it says ‘obtained sandwich’ then he could press ‘i’ to have his inventory come up and the ‘sandwich’ would be in there. Then if he presses ‘i’, it would go away. (Popping up an inventory can be done with load movie)

what exactly do you want?
some hotkey systhem, where you press buttons like 1,2,3,… and some item is used?

a system how to create an inventory where you can select and use the things?

i am in the same dilemma…

what exactly is the dilemma?

the shortcut thing?
a dynamic inventory?

how can u make it so that when you hit test with something it goes to the inventory menu and how do u create the inventory menu in the first place

use an inventory array and store a reference to an array containing the items’ informations there.

u could do a movie clip which has 2 frames in it one blank and one with the iventoryits starts on blank and then when you press i it goes to frame to and shows then when u press i again

I thinks its simple…, create an array and put the put the item there, when you press a key just assign this key to the array location.

var items_weapons:Array = new Array();
var knife = {letter: ‘A’, number = 3}
if(Key.isDOwn = knife) {
actual_item = item_weapons[knife.number];
}
okay, its not perfect but is a poor exemple, you can do it a lot more dinamic and lot more better…:hair:

I think I have come up with a way to do an inventory system that allows drag and drop, but I am still trying to code out the details and what not.

Well Behemoth, if you get that drag and drop system working, could you explain how you did it because I am writing an inventory system where theres 5 boxes and if you press Q it will drop down to about 30 boxes and if you press and hold E for 3 seconds, it will automatically fade out all items and switch the stuff in the boxes into a DO menu which gives you commands you can do. Id like to know how to re-arrange the items so you can select the first 5 that are shown in the smaller menu,

this might not work and sum1 else has prob sed it but i dont care…

1 | 2 | 3


4 | 5 | 6

draw a table with 6 boxes (dont put numbers)

draw a movieclip with nothin in first frame
banana in second frame (example)
pear in third frame (example)

put the instance name as the number of what square it goes on (1-6)

put this code on the banana

if (this.hitTest(_root.man) && inventory1 == 0) {
_root.1.gotoAndStop(2);
inventory1 = 1
} else if (this.hitTest(_root.man) && inventory2 == 0) {
_root.2.gotoAndStop(2);
inventory2 = 1
}

etc

hope this helps

yhack