How To Auto Release Touch?
tanchowyeeiosapp
Member, PRO Posts: 36
in Tech Support
I'm newbie, I have problem don't know how to (auto release touch), when I still touching the actor...
I touch & hold the actor around 10 second, I set the timer within 3 second, the actor will auto release, but how to set it happen?
This is the Rule and Screenshoot,
http://i1219.photobucket.com/albums/dd427/cyee19862/screen.jpg
http://i1219.photobucket.com/albums/dd427/cyee19862/Rule_1.jpg
I have try 3 hour thinking, learn how to fix it, but fail, so I ask on forum to help...
....
Comments
Try this one.
http://www.mediafire.com/download/wdat61mfqps28m0/AutoReleaseAfter3Seconds.zip
The actor will start dropping, if you click/touch the actor and drag around, the actor will move along with your touch and auto drop after 3 seconds.
basically I have a variable called touched, and set it true when touch is pressed and set it to false when touched is released.
But also when touch is pressed, i save the touched_time,
then have a rule that says if current time (time) - touched_time >= 3 (seconds)..set touched to false to auto release it.
Then have another rule that says if touched is true, then move toward touched position by setting x and y velocities.
Hope that helps