How can I stop generate random number?

I want to create math game, show random questions when player life score equal to 0.
So, I use generate random number and use appearance to set text boxes of question hide or not. For example, if the random number is 1 the text box 1 will appear.
Then, I have a problem that I want to stop generate random number for awhile because I want player have time to think and when they choose the right answer life score will equal to 10 again , if not, game over. The game will random number for random question again when score equal to 0.

PS Sorry for my English skills.

1 Like

Hi @ZtotheK !
You can additionally use the “Counter” behavior (As a trigger) and “Timer” (You can search him in the “Interface & Text” tab) for this task.
Here is an example:

Random number generation:

    Controller / Counter / Set Value / 0
    System / Runtime / Repeat Every / 1 sec
 
    Controller / Random Number / Generation Random

Stop Generation:

    Controller / Random Number / Set Value / 0
    Controller / Counter / Set Value / 0

    Timer / Timer Lalel / Reset Timer
    Controller / Counter / Set Value / 1

Start Generation:

    Controller / Counter / Set Value / 1
    Timer / Timer Lalel / Greater Than / 3 sec

    Controller / Counter / Set Value / 0
1 Like

Thank you very much! I will try this solution.

1 Like

…No Problem :wink:!

1 Like

This solution is work! Thank you very much.

1 Like