Problem with time reset

Can someone explain to me what I’m doing wrong?

I want the Timer “Tap” to be reset once the click is Over, however as you can see below nothing happens. Both Timers reset once I start a new click.(Well they should be, but if the timer “TAP” is less than 1 second I want only this one to be reset before I do a new click)

Sorry if this is a noob question, still learning…

I’m not 100% sure but it could be that since the first condition is executed when the mouse is pressed the events are executing multiple times in a short amount of time, even if you only press the mouse button for 0.1 seconds the events will still execute 6 times (starting and resetting the timer). Try changing the first condition to left mouse button released, or maybe a trigger once while true condition (in case the pressing is a vital game mechanic).

1 Like

Thanks for the reply
While trying with trigger once, I came out with the below

Just moved the condition outside and now it kind of works. I think i’ll figure out the rest.

Now if only someone could give me a more detailed explanation :sweat_smile:

I keep confusing the way that conditions are arranged. I am always with the idea that the conditions that are inside each other, are like part 2 (If the above conditions are met, then move to part 2 something like this)

“Left mouse released” occurs only during the frame that the mouse button is released. Your timer events can’t occur since the timer conditions will not trigger outside of that frame.

If you want it to occur whenever the mouse button is not pressed, you should just use “Mouse button is down” as a condition, then invert it.

Also note: You should never use the “And” condition in a normal event. It exists exclusively to be used within an “Or” condition. Using it in the event box by itself can lead to weird behavior as well as just outright bloat your code. (All conditions in the same event box are treated as “AND” by default).


Thanks for the information, I’ll keep that in mind and will try to revise it tomorrow!

By the way I have been using your games as examples for my own, they are very helpful.

For my above post, I am trying to implement tap controls into my already existing swipe controls. (Basically I want the player to move by swiping and attack by tapping)
Not sure if this is possible since I have yet to find an example or tutorial that combines both together.
I have absolutely no idea how to do it, I thought that if I compared the time of the tap<hold it would work. Dunno if this is the correct way