How to repeat a function?

Hi, how are you?

I would like you to please help me with the following question.

How would be the code to make a counter start in 10 seconds or whatever and decrease until it reaches 0 and immediately repeat the process as many times as indicated.

Thank you very much.

You can simply use the timer component
@manudavril1

1 Like

If counter=0
counter=10

Infinity Loop … :laughing:

2 Likes

Sorry for the inconvenience, could you help me by doing a code please.

Thanks a lot.

First , try yourself.

I’ve already tried it and it doesn’t work for me.

It is part of learning.
Try to reason.
Find the error
Test the app
Improve the code …

Show us yours blocks :thumbsup:

Read:

https://puravidaapps.com/learn.php

2 Likes

In fact, that’s what I’m doing, but it got a little complicated and I wanted to ask. Thank you.

I believe you mean this:

Repeat.aia (2.9 KB)

2 Likes

It is part of learning.
Try to reason.
Find the error
Test the app
Improve the code …

Forget everything I said … :man_shrugging:t2: :thumbsup:

1 Like

it is to enable Timer Always Fire and make your code in the Timer event

1 Like