How do I disable buttons

Get help using Construct 2

Post » Mon Oct 20, 2014 3:09 am

Hi im kind of struck

A simple menu layout with option, credit and play button, I have the play button with 3 second sound to it, during those 3 second i want to disable all buttons from working. I have try putting each button to diiferent groups and deactivated the group. I've try button destroy on play button click, still the 2 method doesnt seem to work. How can i archive this? sorry for the bad grammar

tks in advance :)
B
5
Posts: 19
Reputation: 257

Post » Mon Oct 20, 2014 4:28 am

The default buttons of Construct2 are very limited, if its not wanting to cooperate, I would recommend making your own sprite button and simply writing your own control events for when the sprite is clicked on, hovered over, etc. This will allow you to use all the cool sprite actions as well.

That said, have you tried simply setting the other buttons invisible during this period (and then spawning fake ones that do nothing), or overlaying them with an invisible sprite on another higher clear layer so they can't be clicked, or giving each a variable condition you can toggle on/off when play is active...
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
71
S
19
G
8
Posts: 640
Reputation: 9,701

Post » Mon Oct 20, 2014 10:46 am

Disable collision on the buttons you don't want to be clicked. Send the .capx file if you want, this should be easy to do.

Sometimes for this kind of thing I like to set up a global variable for MenuButtonEnabled, which has values of Yes or No. Where you have the 'on click' actions for each button, put these actions under when MenuButtonEnabled=Yes. During the 3 second timer when Play is clicked, set MenuButtonEnabled to No.
B
47
S
17
G
82
Posts: 2,230
Reputation: 48,607

Post » Mon Oct 20, 2014 12:19 pm

Thanks for the reply

Here is what i did
You do not have the required permissions to view the files attached to this post.
B
5
Posts: 19
Reputation: 257

Post » Mon Oct 20, 2014 7:34 pm

As you will soon learn using Construct2... there are a dozen ways to do most anything you are trying to accomplish, its really about finding what looks good to you and doesn't slow down your game (on mobile).
Check out my completed games on the Arcade! Capt. Doe Save the Universe! & Clicker Wizard!
B
71
S
19
G
8
Posts: 640
Reputation: 9,701


Return to How do I....?

Who is online

Users browsing this forum: t redeemed t and 18 guests