My inventory script.

OK so I have been wanting to do this for some time but never did it… but… now i have a working proto-type:D
The lay out is kind of like cotax’s inventory but different…:wink: You can now move items around and have them save there. If you want to “drop” an item you just drag it out off of the inventory and it will drop in the environment. YES THERE ARE BUGS… this is only vrs: .5
inventory script WIP .blend (3.41 MB)

Known bugs:
dragging inventory items will stop dragging if mouse is not on them…I know ill fix that in a latter ver.
some times items will over wright other items… working on that.

Let me know if there is any more bugs… I know they are there.
I will be making a video on this to show how to make your own inventory.

Upcoming features:
The ability to add almost inf amounts of inventories
Be able to drag on item from on inventory to another
Have a hud be able to tell you on screen what your looking at and how much there is.

The code still needs to be freshened up…a lot.:yes:

The lay out is kind of like cotax’s inventory but different

nice progress

Known bugs:
dragging inventory items will stop dragging if mouse is not on them…I know ill fix that in a latter ver.

This is not a bug, it’s how the sensors react, use the mouse_over_any(sensor) aswell :wink:

some times items will over wright other items… working on that.

when u click and drag an item over an other, it start dragging the other thats cousing it i guess.

Also if you do that move mouse a bit faster icon will stop moving in the middle of 4 slots, release the mouse then close the inventory and open it, 1 or both items are gone. but if you use both mouse sensors maybe some of your bugs gets solved.

Idk but I still get the problem of items stop moving even when I use the mouse over any sensors… :frowning: even with inventory holder… That’s why then is a huge invisible plane in the back ground, the secondary reason is to have the property “drop”… The worst thing is when I copy your (cotax) inventory it still has the same problem… IT IS DRIVING ME CRAZY! I just got off work so since time to night I’ll look at it again to see if I can fix it…

BWY I’ll call them bugs because of lack of better words…
I’m also trying to work on making the snapping part of move_and_remove save the last valid location… That way if you do some how get it perfectly in the middle it will default to the know correct slot.

How it is used? Why the two cubes vanish when I click them? Why the camera does not rotate property? It jams and does not rotate even I move the mouse. Where is the inventory? I also pressed “i” just in case it is there.

I’m just starting Blender scripting and really wonder this. I play Guild Wars 2 and its inventory and camera is working perfectly.

By pressing “y”, multiple blocks drops to the world and stacks. I cannot find this code. Checked all scripts. I hope the program was secure and harmless. What all the blend files does?

I’m sorry that I didn’t tell about the controls… E is to open the inventory… T and y are to spawn in test objects to add a gun and 5 ammo. Really theses are just to test that you can spawn in any object with the correct properties and the script will add it. The spawn in blocks are not scripted into the inventory. They have an empty with 2 keyboard sensors. I have work a lot lately so getting vrs .6 out will take some time… Expect about 3 to 5 day wait on it.