Moving two different actor at the same time

mikbiomikbio Member Posts: 54
edited November -1 in Working with GS (Mac)
In my game i need to move two actors at the same time in different direction with a touch method.

I need to move one actor only in Y direction and the other one only in the X direction.
Is there a way to do that?

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Yeah you can.

    make an attribute called whentouched

    So in each actor, when you touch the screen or where ever you want, change attribute : whentouched to true.

    Then rule is each actor:

    When attribute: whentouched is true,
    Accelerate 90 or whatever you want.

    Hope this helps.
  • mikbiomikbio Member Posts: 54
    i've tried but this is not wat i actualy want.

    I have two actors on screen and they have a rule that says.

    When touch is pressed change atribute self.positionX to game.mouseposition.X
    and
    When touch is pressed change atribute self.positionY to game.mouseposition.Y

    what i want is to move this two actors whit two different fingers at the same time and in different directions. If i used the method that you've posted i get to move both actors with the movement of only one finger so if i move the one that has to move on the X axis the other actor automaticaly goes to Y=0.
  • mikbiomikbio Member Posts: 54
    Does anyone know what am i supposed to do? Is there a way to make two actors dragable and cliccable with two different fingers at the same time?
Sign In or Register to comment.