0 votes

I would like to check or uncheck the checkbox with a script from a property value; so if that property is true, the checkbox will be checked.

Godot version Godot 3.3
in Engine by (79 points)

1 Answer

+2 votes
Best answer

You change CheckBox.pressed = true to have it checked and CheckBox.pressed = false to have it unchecked

by (3,710 points)
selected by

In Godot 4 (alpha 5 at least) you do this with _checkbox.button_pressed = true. Using _checkbox.pressed = true will crash your game...

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 webmaster@godotengine.org with your username.