Mini game help!?

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?

Yeah I think it is possible - you need tappable overlay but it will be covered by non tappable one (transparent) - which you will move aside only for short time whan you want the tapp to happen.

This way the reader can tap only in small time window. You just need to time it according to the movement of the arrow.

can you maybe explein a little more?

Do you know how to code tappable overlays?

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

I don’t understand how can I choose the exact seconed for the transparent overlay to be on screen

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 
arrow is)

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.

Oh I get it now!
Thank you

1 Like

Thanks it helped a lot

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.