0 Favourites

How do I make disappearing blocks with respawn

  • 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!

  • Would this work for you?:

    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.

  • Would this work for you?:

    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!

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • shushpo

    You're welcome

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