Collision change

samalmonsamalmon Member Posts: 2
edited November -1 in Working with GS (Mac)
Hi there, I'm making a breakout adaptation kind of game and needed a tip to get my unique style to work.

I want the "bricks" that my ball hits to vanish, add score and be non collidable with the ball for a few seconds. Then to re-appear and be collidable again.

I have the vanishing part working by changing "alpha" to "0" and have made it change the score attribute when hit. I also have the reappearing after the timer working.

How do I make the Bricks non-collidable with the ball for a short period??

I'm also hanging around on your chat room if you would prefer to answer me that way

Thanks in advance, Csam

Comments

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    If you have your collide behaviour in the bricks only, wrap it in a rule thats says if self.colour alpha = 1 then collide.

    If the collide is in the ball you will need a game attribute, when the blocks go to alpha 0 they will need to change this game attribute, when they are back at alpha 1 you switch the game attribute back. Then in the ball, wrap your collide behaviour in a rule that says, when game.yourswitchname is true then collide
  • samalmonsamalmon Member Posts: 2
    Damn. Of course.

    I just had a creative block, thanks for that! Seems obvious now you have said it.

    The collide attribute is with the block so its that easy.

    Thanks Very much!!!
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    No probs, we all get these blocks from time to time and you get so involved you miss the obvious

    Glad to help :)
Sign In or Register to comment.