Hi! You’ve seen those countdown clocks that show on your screen, right? Usually, those are made with TONS and TONS of Triggers. It’s a mess(No offense), and easily bugged. Well, let me show you an easier way to do that!
Credit to @JoeTheChicken
Materials Needed:
Notification 2x
Property 1x
Button 1x
Repeater 1x
Counter 1x
Yes. That’s all. No triggers even involved!
Make the button like this:
Button Message: Start Countdown Timer
Make the First Notification like this(The second is optional at the end):
Send Notification when receiving on: Notify
Block:
When receiving on channel “nolt”:
Set Notification Title: Get Property “Countdown”
Set Notification Content:
Broadcast message on channel: Notify
Counter:
Starting Value: 30(Or whatever time you start with; I’ll just use 30)
Update Property: Yes
Property to Update: Countdown
Use Target Value: Yes
Target Value: 0
Property:
Property Name: Countdown
Property Type: Number
Default Value: 30
When Property Changes, transmit on: nolt
Repeater:
Task Interval: 1
Stop Strategy: After Receiving on Channel(Leave the box below blank)
Second Notification(Optional):
Notification Title: GO!!!
Send Notification when receiving on: GO
Block:
When Receiving on Channel: nolt
If: Get Property: Countdown = 0
Do: Broadcast message on channel: GO
Wiring time!
Button to Counter: Button Pressed → Reset Counter
Button to Repeater: Button Pressed → Start Repeater
Repeater to Counter: Repeater Runs Task → Decrement Counter
Counter to Repeater: Target Value Reached → Stop Repeater
You’re Done now!
-@Blizzy
P.S. There is a bug when you start the Countdown; It repeats the FIRST NUMBER twice! If anyone could help me fix it, that would be great! Right now, I hope this helps!
P.S.S. I MIGHT put pictures in here eventually. Please stop marking this as a wip