Move Two Actors with one touch, at the same time

pixelknightspixelknights Member Posts: 68
edited November -1 in Working with GS (Mac)
Hi,

This is my first post, and the first problem I have encountered whilst developing my game that I can not find the answer for (but i bet you its very simple)

I have an Actor which moves left - right depending on where the user moves, this actor aims to catch items falling from the sky. As the image I am using for this actor is quite large, and the collision area is massive, I have decided to create a invisible actor which will act as my collision barrier.

I want this collision barrier to move with the other Actor when the user touches the normal Actor. Any ideas?

Thank You in advanced

Comments

  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    You need to use a "constrain attribute" behavior on the x and y value of the barrier actor, to the x and y value of the main actor. Take a look at this video from Tshirtbooth on the youtube Cookbook page, it has the information you need.

    http://www.youtube.com/user/GameSaladCookbook#p/search/0/JnlxvMlPG-k

    And watch all those videos if you haven't. A world of information is there about how to use GameSalad.

    http://www.youtube.com/user/GameSaladCookbook
  • pixelknightspixelknights Member Posts: 68
    Thanks SlickZero, exactly what I needed.

    I have been using gamesalad now for 8 months, and this is the only time I have encountered a problem that I could not solve myself or from the forums on this website. I have watched most of the vidoes but not all (only watched the most relevant to my project), I must have missed this particular video, but I did not know that I would want to constrain actors at the beginning.

    But thanks again
Sign In or Register to comment.