Button does not work with the "menu" value.

Discussion and feedback on Construct 2

Post » Sun Apr 17, 2016 2:04 pm

Hello, I have some sprites that I use to check when users touch the buttons.

These buttons (sprite object) have an instance variable of type text called "function", each button has a different value in this variable.

Image

All buttons function correctly except the button that has the "menu" value in its instance variable "function".

Image

If I change the value of that variable with another name, such as "menus" then the button works, do not understand why.

To fix it I have to do this:

Image

There is nothing more with the "menu" value in the eventsheet.

Image

Why does this happen?.
B
29
S
12
G
21
Posts: 801
Reputation: 14,453

Post » Sun Apr 17, 2016 2:25 pm

Have you checked to see that the value of the variable is actually "menu"? You may have a trailing space on there, such as "menu ", which would cause your condition to evaluate to false.
Moderator
B
113
S
41
G
20
Posts: 1,586
Reputation: 19,116

Post » Sun Apr 17, 2016 2:44 pm

I discovered the mistake ... my fault.
There is another button on imported eventsheet.
Apologies and thanks for the help !.
B
29
S
12
G
21
Posts: 801
Reputation: 14,453


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests