Fireflies blink only a few times, Timer “Blink” doesn’t repeat even in Regular mode

Not favoritedFavorited Favorited 1 favourites
  • 10 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • Hi everyone,

    I’m having trouble with my Firefly system. The fireflies blink only a few times and then stay lit.

    I’m using a Timer called “Blink” set to Regular mode, but it doesn’t seem to repeat as expected.

    I’ve tried adjusting the event “On Timer Blink” and the random(1,2) interval, but the behavior doesn’t change.

    Could someone explain why the timer stops repeating or how to make it loop correctly?

    Here’s an image of my event sheet for reference.

    Thanks in advance for any help!

  • Most of your events can be optimized...

    Anyway, from the manual

    Start timer

    Set a new timer, or if the timer exists, re-start it with new options

    So what's the point of using regular if you are starting the timer again after :

    On Timer "blink"

    Solution :

    Switch the timer "blink" to "Once" instead of "Regular" everywhere.

    Also, the issue might be coming from line 281 where you are restarting the timer every random(0.3, 0.8) seconds, while the timer duration itself is around 1–2 seconds. So the timer never reaches its trigger condition.

    Remove the action -> Start timer "blink", at that line

  • HI Kashin, thank you for reply.

    I did what you sugest but now the firefly just blink once and stop forever xD

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • J.Lucas

    Hey, can you screenshot your events again?

  • here it is :)

  • I meant after the fix I mentioned...

    But here's what needs to be updated.

    Line 281 has every random(0.3,0.8) where the time is smaller then your timer "Blink" which is random(1,2), so it will restart the timer "Blink" in less than 1 sec and your timer will not be triggered.

    That should be it..., nothing should stop the timer "Blink"

  • Even after following the suggested changes, the fireflies blink a few times and then stop, and don't blink anymore.

    I don't know what I'm doing wrong.

  • Obviously, only the "Blink" timer issue was fixed. Your visual blinking animation still isn't working because the "isShinning" boolean never gets turned off properly.

    Lines 281, 283, and 284 appear to be unnecessary, so you can disable them.

    Assuming you want to set GlowingFirefly's visibility based on the Firefly's boolean..., you should pick by comparison like this.

  • Thank you so mutch Kashin Ginn :D! Please, how can I send a coffe?

    Would you be interested in helping me with my project and charging for it? I really need someone who understands the program, and you seem to understand it well enough to solve complex situations.

  • Hey, no problem! Don't worry about it.

    I'm active on the forum most of the time, so if you have any issues or questions, just post them and I'll be glad to help when I'm available.

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