brick breaker question >?????

PhilipNewzealandPhilipNewzealand Member Posts: 66
edited November -1 in Working with GS (Mac)
Hi guys, playing with the brick breaker code for a completely unrelated game.

Was wondering if any one had idea to make different bricks have several strength levels and changes image to signify it being broken????

Any clues people ?

Comments

  • RedlerTechRedlerTech Member Posts: 1,583
    yes you can do that. Create a self attribute on the brick(s) called health. When the brick collides with the ball change attribute self.health to self.health-1.

    Then make several rules in the brick(s) - When 85<self.health<95 change image to ____

    When 75<self.health<85 change image to ____

    Get it?

    Matt
    _________________________________________________________________________________
    Next Gen Entertainment Store
    GameSalad Community Project
    Quality Game Making Service
    1 On 1 Project Help
    Free Pong Remix Template!
    Game Creation Log - B.S.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    thats a weird way to have it next gen.

    you just give each on a self attribute (you can call it hit count) with its value set to 0, add one each time its hit,then base your damages and the damaged images off that.

    Example:

    You want a brick that it takes damage the first and second hit, then gets destroyed the 3rd. You would have your 2 damaged brick images. and you would give it a self attribute called hit count

    make a rule in the brick when it collides with whatever your shooting at it, change self attribute hit count to hit count+1. So every time it gets hit it adds one to that

    Then have a rule when attribute hit count=1 change image to first damage image
    a rule when attribute hit count=2 change image to second damage image
    then one last rule when attribute hit count=3 destroy actor
Sign In or Register to comment.