#Stopwatch
1 messages · Page 1 of 1 (latest)
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
alright thanks
Next, build a new float Variable and rename it to “Time”
- Wire the first float variable to this float variable
1: Use anAddcircuit 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
Okay, sounds good. If you run into any trouble, just explain it, (or preferably send a photo) so the issue can be resolved
finished circuiting it idk if i did everything correctly tho
And also set the “0” on the Add to be 0.1
oh i put the 0.1 on the wrong part im guessing lol
and then you just need to clone the “time” and place an “add”
And you’re very close to finished
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
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
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
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
Run something into there
oh
im stupid lol
that was simple
works perfectly now
thank you so much for the help lol
happens to all of us