Im making a survival game and Im having trouble making an inventory

I’m making a survival zombie game (nowhere near finished) and I’m having trouble making an inventory system. iv’e looked at tutorials and it might just be me but they don’t seem to work.

1 Like

Can you link the game? I might be able to help.


Alright, let’s get started.
First things first: What kind of items do you want to use in your game?

Wood, First aid kit, A few different guns, Food, water, and a baseball bat

1 Like

Well, it looks like you got most everything down (the attack button kinda janky tho)

What i’d say is this:
Make seperate objects for each inventory item. Put them in the section of the UI that you want, but make the default sprite what i’d be if you don’t have the object (aka inventory slot is blank), then make an animation for when the slot has the corresponding item in it. When an item gets picked up, have it send a message to the inventory slot that stores it, telling it to loop the filled slot animation. Next, you wanna make it so that when it’s clicked, first it checks if it’s filled, then sends a message to the player telling them to use the item.

I have a perfect example in one of my games, if you would like to see that.

Sure, Ill take a look at the example right now. Where do i find it?

1 Like

Well, it’s not an example, but:

Im not a smart guy, but ill try my best

1 Like

Just look at the inventory sprites and the character and that should work.

I gotta go for now but ill be back later, thanks for the help!

1 Like

Does this help?