0 votes

I'm trying to make a sprite hide upon load.
But unfortunately, it doesn't hide on load for some reason.
I'm using an Area2D detection on an object, right? And I already implemented a display function that'll make the sprite shown when the player is in the area. I also made it hide while/if the player is outside the area.

However, the following isn't working so well:

func _onready():
   self.hide()

Any help would be much appreciated! <3

in Engine by (12 points)

So this is found in the _ready() function, or is it found in a signal called _onready()?

1 Answer

0 votes

I think the function _ready() is the one your looking for. It gets called when the node gets loaded into the tree.

func _ready():
    self.hide()
by (19 points)
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.