0 votes

Hey! So, I'm new to Godot. I made a Memory Card mini-game inside a Platformer Game - it launches when my platformer Character interacts with Area2D.

The thing is, I would like to make the Memory Card mini-game reset or restart every time I click the "Cancel" button, so when I interact with it again the mini-game will start over. Right now, it just somehow saves all the parameters and when I interact with Area2D again it just continues instead of reloading the node. I would like to restart only the MemoryCard mini-game, not the whole Platformer Game.

Here's a short video of the problem: https://youtu.be/qiFufTKEL3o

I tried queuefree() but it just deletes the node completely and I cannot interact with it again. Also tried reloadcurrent_scene() and it doesn't work as well.

Godot version 3.2
in Engine by (19 points)

1 Answer

0 votes

This is because you're just hiding the scene, which doesn't reset anything. The scene is still open in memory. You should create a function that resets the mini-game and call it when you hit the cancel button.

by (8,150 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.