GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Move Two Actors with one touch, at the same time

pixelknightspixelknights Posts: 68Member, PRO
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, TexasPosts: 2,870Member, Sous Chef
    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

    I have no friends. I'm a loser that makes video games all day. Will you be my friend?

  • pixelknightspixelknights Posts: 68Member, PRO
    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
This discussion has been closed.