Touch release or outside, timer begins?
JacobGeary
Member Posts: 11
Hey, so basically I have a bunch of boxes scrolling down onto the screen and I want a timer to start when your finger is either not touching or touching outside of these boxes and when the timer reaches 3 I want the scene to reset. Also when the boxes are touched I want this timer to reset.
I made a rule on the boxes saying
if touch is pressed and inside box, constrain attribute-"gametimer" to 0, timer-every 1 second set "gamescore" to "gamescore+1"
(I have a gamescore attribute). This all works fine..Then I have an attribute called "gametimer" and a rule on the boxes saying
if touch is released or outside, timer-every 1 second change "gametimer" to "gametimer+1".
Then I have another rule on a different object saying
"if gametimer=3 reset scene"
For some reason however, whenever I drag the finger off of the box it resets right away. and sometimes even when my finger is dragging along inside of the moving boxes my scene will reset....any thoughts??
would be greatly appreciated haha
I made a rule on the boxes saying
if touch is pressed and inside box, constrain attribute-"gametimer" to 0, timer-every 1 second set "gamescore" to "gamescore+1"
(I have a gamescore attribute). This all works fine..Then I have an attribute called "gametimer" and a rule on the boxes saying
if touch is released or outside, timer-every 1 second change "gametimer" to "gametimer+1".
Then I have another rule on a different object saying
"if gametimer=3 reset scene"
For some reason however, whenever I drag the finger off of the box it resets right away. and sometimes even when my finger is dragging along inside of the moving boxes my scene will reset....any thoughts??
would be greatly appreciated haha
Comments
Why not just set a timer in a controller actor that just runs every 1 second change attribute gametimer to gametimer+1
The only difference is the timer would keep running even when your finger is touching the screen
Your touches could still keep reseting timer to 0. I'm guessing this is a tap all of the blocks as they fall type game.
___________________________________________________________________________________
BubbleBall Template HERE!!
AppSolute Entertainment on Facebook
If it's not solve the issue then I guess the rule of "outside" is what causing this, think of it for a second, you have a bunch of boxes on the screen, you touch one of them (to drag it) but as you touch one of them you also touch "outside" the rest of them, which triggers your rule, try removing the "outside" rule and see if it solves the problem..
Roy.