How do I make my fireball work

  • Im making a clone of brickbreaker and when my fireball (red ball) hits a brick all the bricks touching that brick are supposed to blow up. However bricks that are nowhere near the brick that is hit also get destroyed I have been looking at my code and cannot find the error. Any ideas, suggestions, solutions, theories on world domination?

    link to capx is below.

    dropbox.com/s/osz60dko5ic6frs/Indy_16export2real.capx

  • theDeletr - check your sprite collision masks in the image editor and also your event sheets for anything that might destroy bricks unintentionally.

  • i checked the collision masks and my events I cant find any reason for the superfluous explosions.

  • how did you make your bricks? are they cloned objects or did you just cut and paste? if you used cut & paste in the editor it makes another instance of that object, not a new object.

    so if you Destroy that object, it will destroy all objects unless you pick them individually.. (by it's UID)

    To avoid this, make sure you are always picking by UID. Or the event that triggers is based on an individual object like:

    Sprite1 OnCollision - Destroy Sprite (this will only destroy that one instance of that object)

    opposed to:

    Button OnClick: Destroy Sprite - will destroy all Sprite instances at the same time.

  • I'v been out of programming with construct for a while, but if you replace the system "pick all brick" with system "for each brick" you should be fine, I guess..

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • thnx

  • The bricks are clones I think. If you have seen Lee Stemkoski's breakout cone tutorial, I place my bricks the same way that he did.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)