#Loop with different timers

1 messages · Page 1 of 1 (latest)

mint fiber
#

How do I make a loop with different timers. Looks like this only uses the timer once

tepid wave
# mint fiber How do I make a loop with different timers. Looks like this only uses the timer ...

You might have to do something like this because the Completed Output is a new flow so the for loop does not wait for the Timer to complete, what this will do is make the Loop wait until the timer is done to move to the next index, but this requires your Event to be a coroutine so its a bit redundant if all you are doing is using the timer to wait but if you are using it for the Tick output or the valueoutputs of the timer then you can copy this image. You also have to set reset on exit to true on the Wait for flow in the Graph Inspector

mint fiber
tepid wave
# mint fiber I tried it, but it doesn't work

your on button click has to be set as a coroutine select the OnButtonClick and in the Graph inspector you have to turn on Coroutine. Then for the wait for flow turn on the Reset On Exit

mint fiber
tepid wave
tepid wave
solemn sky
tepid wave
# mint fiber

Yeah if you are using a Timer Only to wait a few seconds then just use a Wait For Seconds unit instead of this setup we made.

Only do this if you need something specific from the timer like the Tick output or its values while its running

solemn sky
#

ah i see X7 already mentioned about that

mint fiber
#

Trying it now

#

yea that did not work, still not looping

tepid wave
#

I see

tepid wave
mint fiber
mint fiber
tepid wave
solemn sky
#

U cant loop timers that way. All you will be doing is making 5 identical timers that all start at the same time

solemn sky