Hi everyone, I’m new here, please give me some advice regarding the following.
I tried to do an ‘if’ operator like this:
if
event.x < mySquare.x + 50 and
event.x > mySquare.x - 50 and
event.y < mySquare.y + 50 and
event.y > mySquare.y - 50
then
but it wont work unless I modify it to this:
if
(event.phase) and
event.x < mySquare.x + 50 and
event.x > mySquare.x - 50 and
event.y < mySquare.y + 50 and
event.y > mySquare.y - 50
then
I am trying to make a simple game where there is a square in the middle of the screen with points in it. If the finger stays within the square, then the points will automatically continue to decrease. Once the finger moves out of the square, then the points will stop decreasing.
My problem is this: if I move my finger within the square and then let my finger stay there (and therefore not triggering an event.phase == “began”, “moved”, “ended”), how can I relay this message to the program so that the points will continue to decrease?
[import]uid: 46681 topic_id: 8188 reply_id: 308188[/import]