Transparent Box around actor, want to collide with picture not invisible backgrounds. HELP!!!

sarim987@gmail.comsarim987@gmail.com Member Posts: 1
edited October 2012 in Working with GS (Mac)
Hi, I have spent several hours looking for the answer to this, but i can seem to find it. In the game i am making, i have irregular shaped things falling from the sky. There is a man getting hit with these. I have a transparent background around each actor and EVEN when it doesn't hit the actor, it still says game over. What i am trying to say is that i have an invisible box around each actor, i want them to collide when they both hit the picture, not when the transparent boxes hit.
Can somebody please help me, im tired of looking for the answer. I will be very grateful if you help me.

Comments

  • KangavarkKangavark Member Posts: 62
    Did you try changing the collision box under "physics" from square to circle? that might save you some pixel space.

    Otherwise, I'd go back and edit the image so it takes up as much space within the box as possible, and then re-upload into Gamesalad to use.
  • floydianspiralfloydianspiral Member, PRO Posts: 308
    It's hard to tell exactly what you are asking, could you explain it another way perhaps? If you have an image that doesn't take up all of your actor's space, you could use another invisible actor constrained to the former's position, and then if something collides with your invisible actor > trigger what you want.
  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    edited October 2012
    If i understand correct you want to eliminate the space around the picture, and make the image take up the whole actor?? for that you could either reduce to circle for less pixel coverage or expand picture to take up the whole dimensions.
  • bjandthekatz got the idea. But even if i do that, eventually the actor will get hit in the corner, is there another way to do this?
  • bjandthekatzbjandthekatz Orlando, FlMember Posts: 1,375
    bjandthekatz got the idea. But even if i do that, eventually the actor will get hit in the corner, is there another way to do this?
    no.
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    If you want it to look more realistic, you could add a very short timer to the destroy behavior so it looks more realistic when it collides with another actor. Instead of it happening when two corners touch, and the actor destroys before the pixels actually look like they touch each other, the delay will make the actor disappear after a fraction of a second, so the images have that split second extra to come closer together.

    Keep in mind though, a lot of timers can kill performance..
  • andrewm2211andrewm2211 Member Posts: 341
    Yeah uptimistik is right, it will rather create a square around your actor or a circle, those are your options...
    One work around is to constrain the position of a rectangle to that of the character in your game, and make it a little smaller and use that as the collider, and not the character itself.
  • AyubAyub Member Posts: 8
    I know this is an old thread but I was having the same problem. My solution was to use photoshop and edit the 'Canvas Size' but reducing the canvas size it also reduces the invisible box.
    hope this helps anybody having the same issue. :)
  • bds62bds62 Member Posts: 31
    @Ayub (you may have figured this out by now but for others that may come across this), you don't reduce canvas size. You're aim is to use the CROP tool to remove as much white space as possible around your image. That will in turn make your collision box (or circle smaller and closer to your actor.

    Say you had 50 pixel padding of white space around your character, if an object collides with your character it will collide with that 50 pixel padding and not your character.
Sign In or Register to comment.