I can't seem to get my inventory to work properly. I have managed to get a HUD layer going with a lifebar and a slot for weapons, I can pick them up and use them, but I get a bit confused when it comes to setting up the variables.
This is how I currently have it set up:
On the HUD, I have a sprite with frames for each weapon
The player has instance variables:
And the crates are just sprites that when the player collides with for example the gun crate the player instance variable Gun is set to 1 and the gunslot is set to 1.