How do I make all of my powerups instances flash before disappearing?

0 favourites
  • 3 posts
From the Asset Store
A collection of 10 amazing sprite sheet animations for your incredible games
  • Hi,

    I have a problem with Flash behaviour on my powerups. I want to make my powerups flash for couple of seconds before disappearing. Everything works fine when there is only one powerup on the screen - it flashes as it supposed to and disappears properly.

    The problem occcurs when there is more than one powerup - in that case the first one that was spawned (all powerups are randomly dropped by enemies) flashes but others don't. When their "flashing time" begins they may not be visible at all but I checked in the debug panel - they are still on the map OR they may be visible for the whole amount of the "flashing time" and then just disappear abruptly.

    Below is how the second variant looks like - both powerups were spawned in about the same time, but the upper won't flash

    I've tried different approaches

    -For each "powerUp" loop

    -Pick "powerUp" by evaluating powerUp.destructionTimer < 5

    -Pick all "powerUp"

    but couldn't find the proper solution

    Here are my events

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try a method where you have variable condition which begins the flash then locks it out to trigger once. See my events below with the variable added, should have the desired effect.

  • Great answer! :D Thank you so much

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