How do I make my object blink?

0 favourites
  • 4 posts
From the Asset Store
Full hyper-casual game with minimalist visual and procedural difficulty.
  • Hello! I want to make my object blink at the end of the game, before the Game Over Sprite shows. I have this piece of code:

    when game over

    -> (object) Flash: Flash 0.1 on 0.1 off for 1.0 seconds

    -> (System) Set object speed to 1

    -> (System) Wait 1.0 seconds

    -> (GameOver) Set Visible

    So my object has the Flash behavior and it should stop and blink for 1 second. However it seems that this is not working. The object disappears completely. I made the Game Over sprite transparent and I noticed that it actually starts blinking after that 1 second pass (so basically right after the Game Over sprite covers it), even if that action is in my code before the "Wait 1.0 seconds". Can someone tell me how to make it work the way I want? Thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • (Google Translator)

    Did you leave the flash disabled? After you die you enable it.

  • It is unclear what your "On game over" condition really is.

    It is possible that it is an event that triggers more than once, so the Flash is reset every tick of execution instead of only being applied once.

    Try to add the "System: Trigger once while true" condition to this event and see if it is better.

    If it does not help, then provide your actual .c3p (local copy) of your project (or try to reproduce the issue in a new c3p) so that others can investigate it properly.

  • It is unclear what your "On game over" condition really is.

    It is possible that it is an event that triggers more than once, so the Flash is reset every tick of execution instead of only being applied once.

    Try to add the "System: Trigger once while true" condition to this event and see if it is better.

    If it does not help, then provide your actual .c3p (local copy) of your project (or try to reproduce the issue in a new c3p) so that others can investigate it properly.

    Thank you so much! You were right. It is working now.

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