Box around actors ?

JamieOneilJamieOneil Member Posts: 877
edited November -1 in Working with GS (Mac)
I have a game where you can collide with other actors, but they have a transparent box and when you hit the box you die, how do i get rid of the box ? or the canvas on photoshop ?

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Crop your image. Gimp has an auto crop that cut transparent areas out. not sure about photoshop.
  • EastboundEastbound Member, BASIC Posts: 1,074
    To get rid of unnecessary space in Photoshop, you could just crop the canvas.

    EDIT: Photoshop, too, has autocrop.

    To solve the issue in GS, you can make your own custom collide rule (if the player's position is contained in a global variable). Just check

    if player.x > self.x-10
    if player.x < self.x+10
    if player.y > self.y-10
    if player.y < self.y+10

    And you have essentially just created a 20x20 bounding box.
Sign In or Register to comment.