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 came across an amazing game and it had a playable screen. So i would like to take that idea into my game. I would like it to have a text and a playable game in the background - not the long, if you press enter it will redirect you into the real game.

Do i just create the game - menu then add the text then the button - press enter.

Thank you.
If you need more information, please comment down below.

in Engine by (41 points)

Not quite sure what's your question here? Add a CanvasLayer, add a Label to it and write a script that will hide that CanvasLayer once the player hits "Enter".

What exactly are you struggling with?

Maybe if I give you the game link download,
You can start it up and see the loaded screen?
Following Link: This is the link

This should be able to give you the idea of what I'm talking about.

I get what you're talking about. What I don't get is what is your question. ;) I already detailed the general approach: 'Add a CanvasLayer, add a Label to it and write a script that will hide that CanvasLayer once the player hits "Enter".' Which of these steps do you need help with? What is not working?

My question is:

How do I create a interactive game menu - like in the given game link.
I would like a copy of the game in the load screen that the player can play.
But once they press enter the actual game loads.

Hope this explains.
The game that I linked to should be able to tell you what I mean.
When you open up the file of the game and play it you will see what I mean.

Thank you :)

And I already answered that question. In both of my comments...

Ok thx...
:)

1 Answer

+1 vote
Best answer

1: Add a CanvasLayer node to the main-node of your game
2: Add whatever you want to display ontop of the game (e.g. a Label-node) as a child of the CanvasLayer, make sure it's visible and positioned right
3: Attach the following script to the CanvasLayer-node that will delete the CanvasLayer (and all of its children) once the Enter-key is pressed down

extends CanvasLayer

func _input(event: InputEvent):
    if event is InputEventKey and event.scancode == KEY_ENTER and event.is_pressed():
        self.queue_free()
by (10,634 points)
edited by

Thank you very much!
Will try this tomorrow since I'm not able to do so now.

I'm new to Godot and you have helped me so much!!
I really appreciate the help you have given me!

Thank you!

Hi!

Doesn't seem to work?

Doesn't seem to work?

What do you mean? What doesn't work? Are you getting an error? Does it behave differently than you'd expect? Or does nothing happen at all? Have you made sure you're actually calling the Tweens fade_out-method somewhere? How do you expect me (or anyone else) to help you based on that meager amount of information?

I Meant nothing happens at all.

Again: From where do you call the fade_out-method? Have you made sure it's actually called (e.g. by printing something in the method or setting a breakpoint)?

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.