On / Off Switch

Get help using Construct 2

Post » Tue May 15, 2012 1:21 pm

Hi Guys,

I am having a problem of making a switch button.

I have 2 buttons (Red and Green) which controls the color of the light.

It works fine when I put the two button in different location.
Like this

However when I create the two button in the same (x, y), it doesn't work.
Like this

I have already put them into 2 different layers but it still doesn't work.

Am I doing this in a wrong way?

Thanks in advance!
B
3
Posts: 2
Reputation: 379

Post » Tue May 15, 2012 1:32 pm

its because it picks the button on top, a better way to make this, is using a switch like this

switch

i made a boolean variable in the green button,
then on click i switch the boolean on or off
then depending on the status of the boolean, its green or red
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Tue May 15, 2012 2:24 pm

It works fine, Thanks a lot for your help!
B
3
Posts: 2
Reputation: 379


Return to How do I....?

Who is online

Users browsing this forum: Colludium, LaroTaio and 28 guests