How do I make disappearing blocks with respawn

Get help using Construct 2

Post » Tue Jul 25, 2017 5:05 pm

Hi there, good people! I am stuck with the question on how do I make blocks that can disappear after player stand on them and after a few seconds, respawn back at where they were.
I ended up with making two separate objects: sprite for block (with Fade and Solid behavior) and invisible sprite for spawner (with Timer).

How it goes so far:

- Player collides with a block.
- Block starts to fade out.
- The timer on spawner starts.
- After the timer ends, a block is created on a spawner.

It's the short version of what I tried. The main problem is that after the timer ends, it spawns new blocks on every spawner, including those that still have a block on them.
Is there any way to check if there is no block on the spawner, to prevent all this? Or is there any way to write a universal function that can mention the exact spawner, from which the block
faded away? :?: :?

Big thanks in advance!
B
6
S
1
Posts: 23
Reputation: 455

Post » Tue Jul 25, 2017 7:17 pm

Would this work for you?:

https://www.dropbox.com/s/3hlbjvvzpl9kn ... .capx?dl=0

No need for a spawner, everything works off the block behaviours. I've also included a check to move the avatar out of the block if it resolidifies whilst they're overlapping.
B
22
S
9
G
4
Posts: 476
Reputation: 4,327

Post » Wed Jul 26, 2017 8:43 am

Message: shushpo can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
mekonbekon wrote:Would this work for you?:

https://www.dropbox.com/s/3hlbjvvzpl9kn ... .capx?dl=0

No need for a spawner, everything works off the block behaviours. I've also included a check to move the avatar out of the block if it resolidifies whilst they're overlapping.


This is just what I needed :) Thanks a lot for your help, mate!
B
6
S
1
Posts: 23
Reputation: 455

Post » Wed Jul 26, 2017 9:12 am

@shushpo

You're welcome :)
B
22
S
9
G
4
Posts: 476
Reputation: 4,327


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests