drag more objects at the same time

patapplepatapple Member Posts: 873
edited May 2012 in Working with GS (Mac)
hi,

I'm trying to create a system where 4 players on an iPad can drag they own objects but every object separately from the others. I created the drag system but when I drag an object and another player move another one, the second one doesn't move in the right way.

any ideas??

THANKS ;)

Best Answers

  • CluvCluv Posts: 229
    Accepted Answer
    I am confused by what you are trying to do... Are all the players moving across the entire screen or do they have their own space? In most multiplayer iPad games, both players have their own space...
  • CluvCluv Posts: 229
    Accepted Answer
    Then I would set a boolean that gets turned on when the touch is in the appropriate spot, then use that boolean as a "no" case for the opposite touch rule.

    In other words:
    if touch for player 1 is in the right spot,
    then player1touch is TRUE

    for player 2 (if touch is in right spot and player1touch is True)
    turn on boolean for player 2,

    and viceversa.

    This kind of "locks" the touch to the current player... I'm not sure if this is the thought you are looking for, but maybe it will help.
  • rhinokeyrhinokey Posts: 158
    Accepted Answer
    can ios devices even detect more than 2 touches at a time? like 4 seperate fingers moving different objects?

Answers

  • patapplepatapple Member Posts: 873
    I tried also with 1 touch and 2 second touch but now the players must touch the platfrom. In the same order. Any idea how to move this platform separately?? :)
  • patapplepatapple Member Posts: 873
    Yes, every player has an actor that can moves on a line. (min and max x position)

    Thanks
  • patapplepatapple Member Posts: 873
    I don't think your rules could help me. I'm creatung a game like air hockey where everyplayer move the apporpriate platfrom. Do you understand?
  • CluvCluv Member Posts: 229
    I am thinking what you need to do then is have the same rule for all 4 touches, in all 4 quadrants, for all 4 players. Any touch could determine any player in any of the 4 quadrants. It should be nested like this

    if touch.x and touch.y is in quadrant 1
    if touch2.x and touch2.y is in quadrant 1
    touch3...
    touch4...
    each need to be linked to that quadrant and then move that player.

    repeat for all four quadrants.

  • patapplepatapple Member Posts: 873
    it doesn't work. here are the rules that are in my 4 platforms:

    image

    this is a very stupid problem :(
  • patapplepatapple Member Posts: 873
    @rhinokey i think yes, in the app store there are a lot of game that use this feature (air hockey...)
  • patapplepatapple Member Posts: 873
    Anyone?
Sign In or Register to comment.