So, I was brainstorming on how to pull off a decent RE inventory in GM.
I was thinking along these lines:
8 slots
Each slot has an item based on a variable:
~ 1 = empty
~ 2 = handgunammo
~ 3 = knife
..and so on.
No, if you pick something up, I was going to have it so that it would check each slot in turn:
psuedo code here
if global.slot1 = 1
{ do this (probably with a break or whatever) }
else if whatever(do the same as slot1)
Then if none of the slots are empty(1) then you cannot pick up the object.
If a slot is available, say slot 3, and you pick up a atomic bomb, it would change the global.slot3 variable to 666. Then with that if slot3 = 666, you'd see the icon and have the actions for it.
-----breathe-----
Now, you items that can have more then one, would I just have other global variables?
Like this:
psuedo code warning
if global.slot2 = 5
{
show the handgun icon at whatever x and y
show the value of global.handgunammo at whatever x and y
}
if !global.slot2 = 5
{
do not show the handgun icon at slot 2 nor the remaining ammo
}
Sorry if it seems jumbled, just trying to clear my head and hope that someone can see where this is going.