This would mean we would need a wait variable or create a new one? (If there is one never used blocks in a long time) If so, I will try testing it in order to give the solution.
I think you mean to create a variable that waits to complete the block code?
If that is what you mean its not possible to my information because no matter what all block code in a device happens instantly when its triggered.
Triggers can delay, So it can possibly delay for 1 second then go to 39. (possibly)
Set it for a trigger. It should be the solution. As triggers has delays. You could broadcast the channel to the trigger first. and then it will start going down. I think the more simpler way is doing 0 less than or equal to than 40, as the first digit will be 39 (never used blocks in a while)
Okay, I’ll try that I guess…
Did it work? If not, or so, Please send the feedback for the solution i think that is correct.
A real answer
Follow my steps exactly
Place these devices:
1x property
1x repeater
1x counter
1x game overlay
Property:
Inside property settings, change type from “text” to “number” and set the properties name to “time”
Repeater:
Start repeater receiving on channel “start timer”
Task interval 1.0
Trigger on task start is no
When task occurs/runs transmit on channel “timer”
Stop method should be when receiving on channel “stop timer”
Counter:
Set starting value to 40, target value to 0, and to de increment on channel “timer”
Set it to broadcast channel “stop timer” when it reaches the target value.
Have the counter reset on channel “start timer” and set it to update property “time”
Game overlay:
Create a block that runs on channel “timer”
Set the block to this
set text [ get property (time) ]
How to start your timer:
Transmit on channel “start timer” to start the timer. It will stop automatically and you can run it again whenever you want.
If you are confused about any of the details, ask a question. Make sure you are starting your timer by broadcasting on channel “start timer”
Don’t say it didn’t work, tell me what didn’t work so I can fix your setup.
You can test the timer by placing a trigger and having it transmit on channel “start timer” then stepping on it
Okay, I’m gonna try it.
It worked but I need a running timer in the overlay device that decreases 40 times tho.
And which device are you referring to in this part of your message? “ransmit on channel “start timer” to start the timer. It will stop automatically and you can run it again whenever you want.”
They mean any device that you want to start the timer
Like a Lifecycle device?
Whatever device that starts your timer i don’t know what you use.
It worked!! Thank you!! I’m gonna mark you as solution.
This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.