Ugh Multitouch? *Help* Please:)

chosenonestudioschosenonestudios Member Posts: 1,714
edited November -1 in Working with GS (Mac)
Sorry guys, I know there has to be something around here on this, but it eluded me for too long.....

In my game you have to move around two separate actors at the same time... So how would I go about doing this...

You use touch 1, touch 2, etc. right?

If so..... how?

Comments

  • chosenonestudioschosenonestudios Member Posts: 1,714
    anybody?
  • firemaplegamesfiremaplegames Member Posts: 3,211
    You need to account for ALL 5 touches in EACH actor. Since you don't know what player will touch what first.

    Check out CodeMonkey's joystick demo on how to handle this.
  • chosenonestudioschosenonestudios Member Posts: 1,714
    Thanks fmg, but I couldn't figure out what that demo was doing exactly, super complicated....

    But, I did find this thread that you posted on.....

    http://gamesalad.com/forums/topic.php?id=2806#post-22895

    And I kinda have it working, but I need help with this one part...

    "set a rule that if a touch occurs on screen right...control player 1's stuff...and if a touch occurs on screen left...then that controls player 2 stuff.
    You may still need to have a touch 1 and touch 2...but it would be irrelevant whose touch it is because the screen is separated and all actors on the screen are tied to a touch's X coord. origin (if landscape orientation).

    I think that would work...haven't tested it."

    How would I set this up, if touch occurs on top tie it to player 2, on bottom player 1?

    Can't figure out how to do that :(

    Thanks!
  • chosenonestudioschosenonestudios Member Posts: 1,714
    anybody?
  • chosenonestudioschosenonestudios Member Posts: 1,714
    please :( ?
  • chosenonestudioschosenonestudios Member Posts: 1,714
    help :(
  • chosenonestudioschosenonestudios Member Posts: 1,714
    please :(
  • CodeMonkeyCodeMonkey Head Chef, Member, PRO Posts: 1,803
    Here is a quick explanation of how the Joystick project works and how you can use it for multi-drag.

    I have an actor for each touch attribute set. Each actor constrains its position to a specific touch point. Also there is logic to reset the values of the touch positions depending on release of the touch.

    On the joystick actors, they look for the collision/overlap with one of those actors and adjusts its position accordingly.
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    FMG told you to look at CodeMonkey's joystick demo ...

    CodeMonkey's joystick demo:
    http://gamesalad.com/wiki/how_tos:gsc_controls#how_do_i_make_a_joystick_control

    Edit: Dammit. I should have refreshed before I got up to go to the bathroom ... ;-)
  • chosenonestudioschosenonestudios Member Posts: 1,714
    I DID look at His project (see previous post) I couldn't figure it out...

    Thanks CodeMonkey! appreciate it...

    Sorry Guys been trying to get this to work for days I'm kinda pissy about it right now..
  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Sorry chosenonestudios, I must have missed that.
  • chosenonestudioschosenonestudios Member Posts: 1,714
    its cool don't worry about it.. Sorry kinda pissy still haha just hope I can get this to work:) hmmm
  • chosenonestudioschosenonestudios Member Posts: 1,714
    Ahhh I can't figure it out if anybody wants to explain through that would be very helpful.....

    What I need help with is figuring out which touch to use and how to switch them if their lifted up...

    How to switch between touch 1, 2 etc. it would be greatly appreciated I just can't figure it out...

    -sigh-

    If you know a better way to do it too, that would also be helpful.. Thanks!
  • chosenonestudioschosenonestudios Member Posts: 1,714
    help?
  • firemaplegamesfiremaplegames Member Posts: 3,211
    I haven't done any multitouch apps yet, but you will need to do what is in CodeMonkey's joystick demo...

    You need 5 duplicates of everything, in ALL of your touchable actors.
    The good news is that you don't have to worry about switching the touches...
  • chosenonestudioschosenonestudios Member Posts: 1,714
    I'm sorry I'm sooo stupid, but I literally cannot understand whats going on in the demo.....

    or about restricting the touches to certain areas of the screen... :/
  • iPhoneDevForMeiPhoneDevForMe Member Posts: 362
    Ive been staring at that joystick demo and making my own attempt, and I cannot make this work! All I want is to be able to touch 2 different instances of the same actor at once and drag them both around the screen. The demo seems to be set around touch 2 different actors only (stick 1 and stick 2).
  • chosenonestudioschosenonestudios Member Posts: 1,714
    I know its sooo frustrating! I wish this was like totally explained to me because I just don't get how to make this work. :/
  • chosenonestudioschosenonestudios Member Posts: 1,714
    If anybody comes across this and would like to know how to solve it:

    check out this link:

    http://gamesalad.com/forums/topic.php?id=6988&replies=19#post-45994

    Good Luck!
Sign In or Register to comment.