Howdy, Stranger!

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

image change within a box it never physically touches the ball

The issue I am having is I can trigger the image change of the squares the ball rolles on but I need the image change within a box it never physically touches the ball. Please see attached file Scene.png

Each time the ball comes into contact with one of the colored squares it triggers the image to change to a per selected image in the Large orange box. Also when the ball contacts with one of the colored squares, I would like a adjustable % of surface area to trigger image change

Any idea in how to set this up?

Thank You,


  • tatiangtatiang Posts: 11,842Member, Sous Chef, PRO, Senior Sous-Chef
    edited February 2013
    I don't really understand what you mean by an adjustable % of surface area, but changing the color/image of an actor when two other actors collide is very straightforward. Just change a game attribute (e.g. text, integer, etc.) to some value such as "blue" or "3" and then have a constrain behavior in the large/non-colliding actor that sets the image/color of that actor based on the attribute.

    Are you looking for paid help? This thread is for paid services. If not, I can move it to Working with GameSalad.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • ChakkuChakku Posts: 1,513Member

    Do you mean that you have a box-shaped actor with a circle image, and collision ules are being applied when it's not hitting the circle's pixels?

    GameSalad does not have custom collision shapes yet, so that won't work.
    You need to change the 'collision shape' to circle.

    If this was not your problem, let us know.

  • tenrdrmertenrdrmer Posts: 9,934Member, Sous Chef, Senior Sous-Chef
    Sounds to me like @tatiang is almost there with what he wants. You would do like he said with each block having a rule inside where when the ball is on it it changes the game attribute to tell the image what to change too.

    Now the % thing I'm guessing is you want the ball to say have more than 50% of the balls area inside the actor. The best way to to that is to track the distance of the ball to each square. You do that with magnitude. To keep your app from crashing from the massive number of constrains it would take to track all of the magnitudes of every square you only run the constrains when the ball is overlapping or colliding with the square. Then you will only ever have 3 maybe 4 running at a time.

    I hope that helps you understand a little about what you wanting to do.

    Please let us know if its completely off from what you are looking for.


    It's not my fault I never learned to take responsibility for anything. ;)

This discussion has been closed.