Question

I am trying to learn the google app inventor software. I know that these questions aren't answered here, but the question is not about the software but the code. Since this is block code I can't link the code, but what I am looking for is a way to solve my problem.

Question:

I am playing around with they're tutorials to learn the software a bit. In the tutorial you are making a whack-a-mole game. The mole is on a timer(1000 milliseconds) to move the mole to a different location. When you touch the mole it also moves to a different location. When I touch the mole sometimes it will jump to another location, register the hit, and then move again. I have my code set to register the hit before it moves( i checked it several times). I believe my problem comes from the 1 second timer not resetting when the mole it clicked registering two move methods.

Is there way to either reset the timer when touched or the check for touch when timer is up or any other ideas? (I don't think either of these will solve my problem)

Was it helpful?

Solution

When I touch the mole sometimes it will jump to another location, register the hit, and then move again

as the tutorial originally was designed, this could happen, but in the revised version this was corrected and the mole moves only in the Clock1.Timer event.

screenshot

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top