This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I watched this video - https://www.youtube.com/watch?v=rdUgf6r7w2Q&t=1648s - on building an inventory and im lost as to how to actually equip the items for my character to use

Can anyone help me? I'm not sure what code to write for it

Godot version 3
in Engine by (12 points)

Well, to save an item to my 'inventory', I would create a list.
Note that this is only saving data to a virtual data-container, it's not creating any graphics or anything. You would have to create that yourself.

For example...

inventory = ["Magic Ring", "Magic Wand", "Flame-Breathing Dragon Head", "B-Grade Sword"]

and et cetera.

Well, I came back to this question a little later, and saw that it changed. I'm not really sure what you mean by 'equipped'. Is it to set something programmatically? To actually have your item appear on screen?

Isn't equipping something basically the same as changing a variable...

var item_equipped = "Magic Ring"

And creating something on screen based on that?

func _process():
#show item_equipped on screen?

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.