0 votes

So im making a 2d platformer and followed a tutorial to make the scene reload once you fall inside an area 2d it works perfectly but only once, if i try to drop my character to there again it will just continue falling like it isnt there, why is this?

My code is
var k
func onFallzonebodyentered(body):
k=get
tree().change_scene("res://Level1.tscn")

Godot version 3.3
in Engine by (12 points)

Is the function getting triggered when the player falls in? Did you connect the signal when you changed the scene?

1 Answer

0 votes

You can just use get_tree().reload_current_scene() if all you want is to reload the scene.

by (1,055 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 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 webmaster@godotengine.org with your username.