0 votes

First of all sorry for the lame question and for the bad english.
I do not have any experience in python nor gdscript.

So, i'm making a 2D game and the player needs to get a key to open a door which leads to the next level.
When the player gets the key WHAT can I do to display the key icon when he acquires it? And on the next level I want the key icon to be hidden in the HUD until he gets another one.

I saw some tutorials but I'm having a hard time to adapt something usefull.

Thanks people :)

in Engine by (12 points)

1 Answer

+2 votes

$Sprite_name.show() ?
Youtube has some REALLY good tutorials for early stage game dev !
You should check out GDQUEST

by (184 points)

yeah i usally watch some of them videos and some other tuturials like HeartBeast and Godot Recepies. Really great content ;)

Thank you very much, i will try to implement the line to make the thing happen ;)

the godot doc was weird at first for me.
But it helps. Keep it open on your browser when you code.
You can hide(), show(), position with a Vector2() etc...

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.