62
Views
5
Comments
Solved
Increase a number every second.

Hi, I am trying to make a mini game inside outsystems.

Just a super simple one like coockie clicker.

I did a research without success to find what I am looking for.

Dont know if one of you could help me.

I just need to have something. Timer or something that increases a number every second. 

So example, If I click a button, Onclick it would trigger something that would increment 1 every second and refresh the screem. So I would click 1 time on the button and forever the number would change from 1 to 2....3..4....5....6.....7 without having to click again in the button.


Thank you in advance.

2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Pedro,

I don't know about the Cookie clicker game. A guess, Is this what you are looking for? NumberIncrementer

If so, refer to the attached .oml file.


I hope this helps you!


Kind regards,

Benjith Sam

RWA_Lab_NumIncrementer.oml
2022-01-25 15-06-08
Pedro Boffa

Hi.

That might do the job. Thank you a lot for you time!! 

2021-03-18 21-03-15
Benjith Sam
 
MVP

You're welcome, Pedro.

Glad to help you :)


Kind regards,

Benjith Sam

2021-03-05 13-56-11
Ricardo Pereira
 
MVP

Hi Pedro,

What you need, is something like a Countdown?

I believe you can adapt some already existing components from Forge to work that way:

https://www.outsystems.com/forge/list?q=countdown&t=&o=&tr=False&oss=False&c=%20&a=&v=&hd=False&tn=&scat=forge


Take a look, maybe you already have something that solves your problem or just with a little bit of tweaking.


Hope this can help.


Best regards,

Ricardo Pereira

2022-01-25 15-06-08
Pedro Boffa

Hi, thank you for your answer.

Its more like a CountUP!!

I dont know if you know the game: Cookie clicker https://orteil.dashnet.org/cookieclicker/

When u buy on the right side a tower. This tower gives per second a number,

Example: In Coockie clicker when you buy a grandma it increases per second your income in 2. so every second there is a number in the screem that increases 2 points every second.. Would be something like that. I am trying here and seems to work using a loop or if condition.. but if I use any other button in the screem the action stops.

2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Pedro,

I don't know about the Cookie clicker game. A guess, Is this what you are looking for? NumberIncrementer

If so, refer to the attached .oml file.


I hope this helps you!


Kind regards,

Benjith Sam

RWA_Lab_NumIncrementer.oml
2022-01-25 15-06-08
Pedro Boffa

Hi.

That might do the job. Thank you a lot for you time!! 

2021-03-18 21-03-15
Benjith Sam
 
MVP

You're welcome, Pedro.

Glad to help you :)


Kind regards,

Benjith Sam

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.