How do I make an unclickable button

Get help using Construct 2

Post » Mon Dec 12, 2016 12:09 pm

Hi, I'm making a maze game. At first, the second level button was unclickable, but whenever you play the first level and touch the 'key', the second level unlocked.

I know it's possible.. Because it's Scirra Construct 2 ;D
B
5
Posts: 15
Reputation: 255

Post » Mon Dec 12, 2016 12:19 pm

Are you trying to make sure that the second level stays locked after completing the first level, or to unlock automatically after completing the first level? Or maybe something else...
B
22
S
9
G
4
Posts: 476
Reputation: 4,327

Post » Mon Dec 12, 2016 2:12 pm

mekonbekon wrote:Are you trying to make sure that the second level stays locked after completing the first level, or to unlock automatically after completing the first level? Or maybe something else...


Trying to make sure that the second level stays locked after completing the first level.
B
5
Posts: 15
Reputation: 255

Post » Mon Dec 12, 2016 3:13 pm

1- Make a sprite at the end of the maze.
2- set visibility to invisible
3- Make new global variable name it level1
Events and actions:-
when player collision with the "sprite ">> system add 1 to "level1"
when touched "second level"
and "level1" = 1 >> unlock your second level
B
60
S
22
G
12
Posts: 209
Reputation: 10,074

Post » Mon Dec 12, 2016 8:49 pm

You can also simply set the button to "disabled".
Done.
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091

Post » Wed Dec 14, 2016 6:58 am

Or just add another condition like Layer 1 is Visible and the other button has Layer 2 is visible like that..
B
79
S
31
G
7
Posts: 148
Reputation: 9,179


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests