I’m working on a mini game for my story where you need to open a lock.
I wanted the lock to have an arrow in the middle thats spins (slowly) and you need to tap when it points on the right number. I
I know how to make the arrow spin but I don’t know if there is a way to know if someone pressed the arrow at the right time.
is there anyway to do this?
basicly you make your standard tappable overlay - the arrow
And you create any other overlay which is bigger than the arrow - and you will put it on higher layer than the arrow. And you will keep opacity of this overlay on 0 - so it will be transparent.
But because it is on higher layer it will not alow reader to tapp the tappable arrow.
And in the moment you want to alow the tapp - when the arrow points on right number you will shfit the transparent overlay to side so it will no more cover the tappable overlay and it will therefore be possibe to tap on it. And can then again shift it back on the place to cover the arrow when it again shifts to another number
Yeah, pretty much what the person above explained. I sort of used a similar method in my story for a minigame. Start with the overlay WIN offscreen and with the overlay LOSE above the arrow.
So, above the arrow spinning code, you put something like this:
&overlay LOSE shifts to (where the arrow is) THEN
pause for 0.9 THEN overlay WIN shifts to (where
arrow is) AND overlay LOSE shifts to (offscreen)
THEN pause for 0.1 THEN overlay WIN shifts to
(offscreen) AND overlay LOSE shifts to (where the
You can play around with the timings.
The pausing for 0.1 is how much time the reader has to tap on the arrow when it’s in the correct spot, and the pausing for 0.9 is when the arrow is in the wrong spot.
well— let say it has 10 numbers and it will rotate in 5 seconds the whole circle
so each number it takes 0.5 second…
.so if you start on 0 and the right number is 2, you know it will be pointing on it exactly on it at 1 second
so you can shift the overlay away let say between 0.8-1.2 second so there will be some time for the tapp.