chain reaction of exploding block that respawn aft

Get help using Construct 2

Post » Thu Feb 13, 2014 4:04 pm

I'm trying to create a chain reaction of destroying blocks that respawn after 5 seconds.

When the player touches a block it gets destroyed, if that block is touching another block then that block gets destroyed also etc.

Now I managed to get this working, but, I need to respawn the destroyed block 5 seconds after they've been destroyed and this is what I cannot figure it out.

This is how I have it setup, I tried without making another block but I couldn't get the chain reaction to work...

bblock with a instance var of 0
bblock2 also with a instance var of 0

player -> on collision with bblock
-wait 1 second
-destroy
-create bblock2 at x and y of bblock
-set touched to 1

bblock2 -> is overlapping bblock
-wait 1 sec
-destroy
-create bblock2 at x,y of bblock
-set touched to 1

system -> every tick->bblock2 touched = 1
- destroy


Any help would be appreciated!
Thanks in advance.
B
25
S
13
G
19
Posts: 56
Reputation: 11,741

Post » Thu Feb 13, 2014 6:19 pm

You could just make the blocks invisible instead of destroying them.

Here's a example:
https://dl.dropboxusercontent.com/u/5426011/examples21/spread_and_return.capx

And a no family version:
https://dl.dropboxusercontent.com/u/5426011/examples21/spread_and_return_noFamilies.capx
B
94
S
33
G
118
Posts: 5,394
Reputation: 75,849

Post » Thu Feb 13, 2014 6:37 pm

Hi, thanks, but I cannot open the project.
It says it was saved with version 160.2 but I have version 158.2 (the latest on the website)
B
25
S
13
G
19
Posts: 56
Reputation: 11,741

Post » Thu Feb 13, 2014 6:58 pm

It's the beta download. You can find the link if you scroll all the way down under "Download". Or use this link:
http://www.scirra.com/construct2/releases/r161
B
94
S
33
G
118
Posts: 5,394
Reputation: 75,849

Post » Thu Feb 13, 2014 7:48 pm

Thank you it works great! I'll be able to work off this.
B
25
S
13
G
19
Posts: 56
Reputation: 11,741


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests