How do I make disappearing blocks with respawn

0 favourites
  • 4 posts
From the Asset Store
25 high quality isometric ground blocks + sprite sheet
  • 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!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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 <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /> Thanks a lot for your help, mate!

  • shushpo

    You're welcome

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