lock screen until end of rotation
BrynjeBamsen
Member Posts: 188
i have made a spinner that rotates a number of times when touch is pressed.
my problem is that i want to make the screen NOT to react to another touch until rotation is over.
how do i do that??
my problem is that i want to make the screen NOT to react to another touch until rotation is over.
how do i do that??
Comments
and on the spinner when touch is pressed changeAttribute game.Busy To: true
when rotation is complete changeAttribute game.Busy To: false
on your other touch actors in your Rule (All) when Touch is Pressed add the condition Attribute game.Busy is false..
MH
could be you a bit more specific. i was thinking if you could spawn an actor on top that you could NOT touch through or something and then destroy the actor according to spinstop?
otherwise thank you great assistens
many ways to skin the cat...
okay... you just want the SpinnerArrow to react to touch?
on SpinnerArrow
Rule (All) when
Actor receives event | touch| is |pressed|
Timer
--For: (random(1,4) seconds √ Run to completion
--Rotate clockwise
Speed: 300
you can choose the random function's (min,max) so spinner will not always stop in same place.
the main thing is √ the Run to completion so the arrow will not react to another touch till the rotation is done.
MH
After the initial spin.( which works now ) You should not be able to touch anything until end og my interpolation Randome(0,360) spin.
how do i achieve that? cant get your pause funktion to work
rotating actor
Rule
when touch is pressed
--changeAttribute and change the game.BUSY To: true
--Timer stuff to do rotation
-- Timer: After 4 seconds
----changeAttribute game.BUSY To: false
and on your touchable actors enclose/nest your touching Rules in
Rule when Attribute game.BUSY is false
to the stuff...
(you could make time exactly the random number for changing the BUSY...but, try this and see if you are getting what you want/need.)
MH