frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

timers are completely broken?

edited September 30 in Bugs
so i revisited my game, GalacticoS, to code in a main menu while i wait for my friend to make cover art. I encountered a bug with the first moving laser cubes and i kept trying to fix it with no sucess.
ISSUE:
my timer blocks wont actually activate when theyre supposed to. for example, i have this system where i want two timer blocks activating every twelve seconds, six seconds apart from each other (like a red and blue police light would cycle through activation). the blocks in the front (furthest right) are set to repeat forever while the ones behind are set to repeat once. no matter what value i put in, as long as its 6 or 12 both blocks behind the main ones will activate at the SAME TIME. i tried stacking blocks behind them because starting the level causes them both to activate, but not even this solved the issue. im out of ideas and really concerned.

to discover the issue, go to the tessa structure level, select the first laser cubes that the player could get killed by and look for this in the code.
Screen Shot 2019-09-30 at 4.51.01 PM
please let me know if its just my computer, as the things i code next could be plagued by this as well. thank you.

Comments

  • edited October 1
    Could you also leave a link to the game when asking for help. Although the game is on the front page, its much faster to click a link than to open flowlab in a new tab.

    well, one problem is that they are set in 1/10 of a second so 6 seconds is 60 and 12 seconds is 120...
    You have them set for .6 seconds and 1.2 seconds

    The other problem is that your pausing the screen when the timer activates, so the timers would be done but haven't outputted yet (one thing about pausing the game is that it only pauses timer outputs) but you can go around this.

    Also the math of the 6 timers would only make them off by .2 ((8+10) - (10+6) = 2).

    This should solve the issue:
    2019.10.01-18.05
    The first timer is set to 1 w/ repeat of 1 (this will output when the game unpauses)
    The top timer is 120 w/ repeat forever
    The bottom is is to 60 w/ repeat of 1 and then 120 w/ repeat forever.
  • Thanks for resolving the issue, guess I didn’t fix some stuff before I posted this. I Appreciate it!
Sign In or Register to comment.

flowlab.io

| make games in your browser
@ 2017 Flowlab.io, All rights reserved.

Contact us

Get In Touch