Making the Buttons Deactivated

Good evening, so I have a problem and I tried multiple types of possible events and conditions to make it happen but it doesn’t work.

So the problem is I want to make my buttons deactivate, so here’s the scenario: (it’s a spelling game)

  1. I have a total of 8 buttons with one letter on each button to be clicked by the player and add to the text object. (I used instances to make the button label appear using array thanks to @insein help last time)
  2. (So here’s where I’m having trouble) So when the player guess the right answer the button that was pressed to form that word will deactivate, but when the player guess the wrong answer the button is still interactable.

Is it possible to deactivate the button that was pressed by the player. Your help will be much appreciated. Thank you in advance.

Oh and also can I ask how to limit the characters for a Text objects.

Hey there,
Simplest way I think to deactivate button is to enable the events that happen when pressing it only when it’s a certain animation.
For example if the condition is
Touch is released, add Animation of Button is "Activated" condition
To deactivate it, simply switch to a different animation (which you should put a “pressed” sprite, of course)

Ohh thank you I will try that. Thanks for the response again.

Hi @Hareto

@reina’s suggestion works for a “sprite” object with animations, but won’t work for your project since you’re using a “button” object.

Instead, there’s an action for button objects called “De/activate interactions”.

thank you for the correction! I haven’t used GDevelop for 4+ months, it’s clear I’m not up-to-date with all the new features.
(surprisingly I feel an urge to answer questions…)
feel free to keep correcting as you see them~

1 Like

Thank you! I happen to know Hareto is using a “button” object because of another topic.

Feel free to add any suggestion you feel it can help. I learn a lot from people’s answers.