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

http://dl.dropbox.com/u/2972641/Initial 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,
-Matt

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    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 Member Posts: 1,513
    @artistaddy

    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.

    Chakku
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    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.

    Cheers
Sign In or Register to comment.