Jump to content

Items to Inventory?


havenphillip
 Share

Recommended Posts

Hey Community. I'm new to Leadwerks and I've been going through Aggror's Project Saturn and I got stuck at a point where I was unable to put items in the inventory. I moved some things around and found some scripts and got it to work but now my problem is I don't know how to add just one item to the inventory. It just adds the item to any open slot. I'm sure it's something dumb that I would never guess because I'm new to programming. I have the Player Inventory script attached to the Bottle the Inventory Item script is being imported to the Player Inventory. Also, it is saying System:Print("We place the bottle in the inventory") so I'm assuming I'm close. Could someone please help me out with this?

Amidoingthisrightlol.png

Bottle Script.png

Inventory 1.png

Inventory 2.png

Item Table.png

Link to comment
Share on other sites

Nice. A response from the man himself.

I did what you said and I didn't have any luck initially but I messed with it some more and for whatever reason ended up also changing the self:AddItem(item) in the PostRender function to self:AddItem(self.item) to see what would happen and those two changes seem to have done it. I have no idea why but It appears to be working perfectly now.

Thanks, man!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...