frame

Howdy, Stranger!

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

Sign In Register

[SOLVED] NAND not working?

edited April 12 in General
Hello,

I have a timer in my game which increments the score every 1/10th of a second, feeding through a NAND gate first.
Once the game ends, another timer is triggered at 1/10th delay (have also tried 0 to no avail) also feeding into the NAND.

The result should be the score stops incrementing, as the NAND should output 0 once both inputs are 1, however it continues to output 1 anyway.

Am I doing something wrong? Is it possible the two timers are firing slightly out of sync, thus the NAND would always be on?
If so, is there another solution to what I'm trying to do?

The game can be seen here:
https://flowlab.io/game/view/866645

The logic is in the Game Controller (blue box to the left):
Screen Shot 2018-04-11 at 18.23.56

Comments

  • I think you are almost certainly correct that the timers are not firing at exactly the same moment. Any frame that they don't fire together will mean that the NAND still activates.

    If I understand your intentions correctly, can you just use a switch in place of the NAND gate, and turn it off when the game is over?
  • Ah damn, I somehow completely missed the switch.

    Yeah that works perfect, thanks a bunch!
Sign In or Register to comment.

flowlab.io

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

Contact us

Get In Touch