View Full Version : Creating an inventory system menu
jugglinggoalie
July 27th, 2004, 11:45 PM
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
Behemoth-Dan
July 28th, 2004, 04:26 AM
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.
signifer123
August 3rd, 2004, 03:55 PM
??? wha tdo you mean like if you press "i" a inventory menu come up and if you press "i" again if disapears?
kerek
August 3rd, 2004, 06:16 PM
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)
McGiver
August 3rd, 2004, 08:26 PM
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?
mixedtrigeno
August 5th, 2004, 07:18 PM
i am in the same dilemma....
McGiver
August 5th, 2004, 09:33 PM
what exactly is the dilemma?
the shortcut thing?
a dynamic inventory?
mixedtrigeno
August 6th, 2004, 06:57 PM
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
McGiver
August 6th, 2004, 08:28 PM
use an inventory array and store a reference to an array containing the items' informations there.
burtboy
August 8th, 2004, 07:14 AM
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
NeoDKS
August 9th, 2004, 02:22 PM
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:
Behemoth-Dan
August 10th, 2004, 08:27 AM
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.
colin2003
August 12th, 2004, 12:04 PM
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,
yhack
August 13th, 2004, 06:12 PM
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
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.