Hello. I ran into a problem where I need to update a number every 60 seconds, but it only works once. Is there a way to make it soo that it would loop/repeat when the function reaches at the end or when 60 seconds are over.
It sounds like you want to run a function that updates a number every 60 seconds, and you want this process to repeat indefinitely. To achieve this, you can use a loop along with a delay function. Since you haven’t specified a programming language, I’ll provide a general pseudocode example that you can adapt to your specific language:
while true: // Infinite loop
// Call your function to update the number
updateNumber()
// Pause the loop for 60 seconds
sleep(60 seconds)
Either in tick or construct, I don’t know which is the best way. It’s been a while since I wrote a widget BP. I know best practice is to stick far away from tick, unless you have to. You should be able to call a function to trigger the event. Search the bp database, non-contextual, for your “Timer”. There should be a function in there for the event.