The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

0 votes

Hello! Is there a way that i can make a button, after being press, display two more buttons? Without scene change

Godot version 3.2.1
in Engine by (30 points)

2 Answers

+2 votes
Best answer

In Button > Signals > BaseButton > pressed() creates a function (put it in the main scene script) that is run when the intial button is pressed:

func _on_Button_pressed():

You then have a couple of ways depending on what you want to happen.

First: if already you have the next two buttons already created in your scene (but hidden), then use .show() on both your other buttons, maybe like this:

func _on_Button_pressed():

Second option: you would like new buttons (created in the script):

var button_counter = 0

func _on_Button_pressed():
    for i in 2:
        button_counter += 1
        var new_button =

After doing this you would then need to define every aspect of each button in the script, like its text, size, style, font, options, etx, for both buttons (this isn't shown).

Hope it helps!

by (1,016 points)
selected by

Thank you! It was way more simples than i was trying to make, haha. Thank you again

+1 vote

Yuminous has already provided you a great answer but you can also make these more appealing. Here's a great tutorial by KidsCanCode

It's somewhat complicated but still it will give you some lessons and you will learn many more great things.

by (942 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.