Button touch does not work

Hello…
Button does not work at all.

(restart, exit)

The event content is as shown in the screenshot.
What is the reason?

1 Like

It could be that state is not “failed”. Can you confirm what the value of state is before tapping/clicking the button? Easiest is to preview in debugger.

1 Like

The previous state was like this.

1 Like

Providing screen snips of events you think are relevant isn’t the best way to go. If those events display the buttons and set the state to “failed”, then there may be an issue elsewhere.

I suggest a few actions to the events of you first screen snip. Use the action to write to console in the first two events, using a different comment for each action. Then preview the game and check the debugger console to see if both comments come out.

2 Likes

I made it so that when I click the restart button, it goes to the main scene. But why doesn’t the touch work in the main scene after that? I can’t find a solution.

1 Like

Do you have the same events in the main scene? You’ll need to provide screen shots of the events in main for someone to help.

1 Like

It might have something to do with the variable ‘state’? Maybe because the variable is still “failed” that makes the other buttons to not work? Can you show a snip of the events of your main menu buttons?

1 Like

“state” is a scene variable. Neither the variable nor it’s value are transferred to main.

2 Likes

This is the main scene event. The main scene works fine when you first start it, but when you go back to the main scene via the restart button in the game scene, the screen touch does not respond.

1 Like

How far doe it get wrt the response to a touch?
Does the title show up and then disappear a fraction of a second later?
Do the start and instruction buttons appear on screen?
Does the countdown begin?
Where is screenTouch?

There appears to be more events off the bottom of the screen snip. What do they do?

1 Like

The screen touch doesn’t work at all. When you touch the screen, the title disappears. The screen touch covers the entire screen. When you touch the screen, a game description screen and a game start button appear. When you press the game start button, a countdown starts, and then the game starts. There are no more events at the bottom of the screen.

1 Like

Sorry, I’m a bit confused. My questions were about how far the main scene goes after a restart.

Does the game title shake intermittently?

1 Like

The game title has a scale tween function. When you touch the screen, the tween function stops.

1 Like

Now, the entire “touch or left mouse button is down” is not working, so I changed it to “button state(FSM)” and it works. I don’t know why.

1 Like

The main scene doesn’t get longer. It’s the same as when it first started. The game title also gets bigger and smaller due to the tween scale. What does this have to do with this issue?

1 Like

Working out what works and what doesn’t, so at what point the program fails.

But you have it working with button state FSM.

1 Like