How do I change state of block correctly?

Get help using Construct 2

Post » Mon Jan 26, 2015 12:37 pm

Hello, currently I am trying to improve my knowledge of Construct 2 by writing Arcanoid/Breakout clone.

In game I have blocks that can be destroyed after few ball hits. My usual way of implementing such blocks was destroying Block A on collision and spawning Block B at the same spot and at the same time. However I believe that while this solution works fine, it isn't a correct one.

So instead I decided change animation frame of block on 1st hit and destroy block on 2nd hit.
Here is my current code (ignore the angle part):

And there I found a problem. If I change order of events then my block is destroyed after a single hit. I believe this is happening because overlapping between block and ball happening for more than a single tick and both event conditions are true for a virtually the same amount of time.

So, my question: Is there any way to set a delay between events, so they won't happen at the same? Or add specific logic for this case?
Posts: 7
Reputation: 436

Post » Mon Jan 26, 2015 2:15 pm

Use 'System:Else' between the different animation frame conditions so that only one of them runs, like this:

Posts: 1,520
Reputation: 25,870

Return to How do I....?

Who is online

Users browsing this forum: OddConfection, Strawoy, zenox98 and 57 guests