#Stopwatch

1 messages · Page 1 of 1 (latest)

main crypt
#

i may be stupid but idk, eitherway if anyone knows how to make a stop watch that resets time after ended please send a photo of the circuits or lmk how, thanks in advance

vague ravine
#

Basically, what you want to do is create a system that gets your Time Get Precise Seconds and compares its value via If and Greater or Equal with a float Variable

To do this, you’ll need these five circuits

  • Event Receiver(configured to Update: 30HZ)
  • If
  • Greater or Equal
  • float Variable
  • Add

1: Place your Event Receiver: Update 30Hz and wire it to your If circuit.
2: Connect the bool ports on the If circuit and the Greater or Equal circuit (bools are red)
3: On the Then port of the If, wire that to your float Variable
4: On the Add, wire the Time Get Precise Seconds value into one port, and manually type, “0.1” in the other.
5: On the Greater or Equal circuit, put the Time Get Precise Seconds value at the top, and the Float Variable value at the bottom
6: On the Add circuit, wire the right sum port to the left value port on the float Variable

#

@main crypt

main crypt
#

alright thanks

vague ravine
#

Next, build a new float Variable and rename it to “Time”

  • Wire the first float variable to this float variable
    1: Use an Add circuit to add 0.1 to “Time”
    2: Build a button and wire it to a new float variable (also named “Time”)

Pressing this button will reset the “time” variable and still continue the timer. Pressing the button will always reset this timer

#

An extra tip, use a circuit called To String to turn your “Time” Value into a string

This way, you can show your stopwatch time as a subtitle or a text

main crypt
#

alright

#

im gonna wire everything together and make sure i did it right lol

vague ravine
#

Okay, sounds good. If you run into any trouble, just explain it, (or preferably send a photo) so the issue can be resolved

main crypt
#

finished circuiting it idk if i did everything correctly tho

vague ravine
#

And also set the “0” on the Add to be 0.1

main crypt
#

oh i put the 0.1 on the wrong part im guessing lol

vague ravine
#

and then you just need to clone the “time” and place an “add”

#

And you’re very close to finished

main crypt
#

undo?

#

oh wait

#

ah ok

vague ravine
#

And then wire the float variable to the new time and add to it

#

I’m going to have to go for a bit so hopefully you can figure it out within the next 40 minutes before I come back, if not someone else might come to help

main crypt
#

ok thanks for your help

#

@vague ravine dont want to disturb but everything works perfectly now once your back and if i dont figure it out how would i make start and stop

vague ravine
#

Create a bool Variable and name it “Started”

Place an “If” and have the “Event Receiver” that you already have placed run into it

Wire the bool variable named “Started” into the “If” (via bool)

Now set the variable to True to start the timer, and False to stop the timer

main crypt
#

alright

#

im gonna add them rq

#

start works but how would i make it stop

#

i tried making a 2nd bool but i can only have one at a time

#

or is there something to turn it into false

vague ravine
#

Use a “not” circuit

#

Wire both sides to the bool variable

main crypt
#

ok

#

ty

#

start and stop works but when i stop it how can i make a trigger to reset it

main crypt
#

oh

#

im stupid lol

#

that was simple

#

works perfectly now

#

thank you so much for the help lol

shut delta