Confused about Touch1, Touch2, etc.....

gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
edited February 2012 in Working with GS (Mac)
I ran one of my "sleeping" projects on the iPad viewer today, a top-down shooter. It has joystick control and fire button. Anyhow, I noticed that I can control the player at the same time as press the fire button, both working fine at the same time. Both these actor have when Touch1 is pressed.

I always thought that I'd need Touch1 and Touch2 for both to work at the same time.... so if I don't, what is the purpose of more than one Touch attribute in Devices then? (Using two fingers to enlarge and reduce, I guess, but if touch1 works on two controls at once , still why do we need more? Anyone can explain please?

Your Sincerely

Confused of Kent, UK ;-)


----------------------------------------------
http://davidgriffinapps.co.uk/

""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

Comments

  • POMPOM Member Posts: 2,599
    edited February 2012
    Gyro ,
    Touch is pressed is not linked to a specific Touch # and will register regardless of how many fingers you have on the screen .
    We need Touch1 and Touch2 and Touch3 etc , mainly for multitouch constrains , so 1 actor can be constrained to 1 finger , and another actor to a different finger .
    Also , we need "touch count" for multiple proposes , one of them can be to determine the finger # that currently pressing the actor.

    Hope that this clarify things a bit ;)

    Roy.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited February 2012
    To my aid yet again, Roy! Thank you, and I understand now. :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • GLGAMESGLGAMES SingaporeMember Posts: 988
    so this is the way tap tap works?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    @GL

    if you mean double tap, no. You would create a attribute for that and record the amount of taps within a certain time period.
    For Example:

    Rule=
    When touch is pressed
    - change attribute tapCount to tapCount+1
    -timer after .5 seconds change attribute tapcount to 0 (run to completion checked)

    Rule=
    when tap count=2
    -do double tap stuff

    What there referring to in this thread is multitouch.
    Example:
    How many fingers are toucing the screen at once, position of the first finger and the second finger, ect.

    cheers
Sign In or Register to comment.