Every step, the code in the draw event is executed.
You need something to pause the game after you asked the question
One option would be to use mouse_wait() (for if the player should click a button) or keyboard_wait() (for if the player should press a key);
To wait until the player presses a specific key, you can use the code:
you should replace key with the code/name of the key you want to end the pause with.
there is also an easier way to do this, and that is to use the get_integer function.
with this function, a pup-up message will appear, and the player can enter an integer.
you can use a code like this:
if you also want decimal numbers, you can use this code:
answer will be the value that the player enters.
you don't have to put this code in the draw event, you can put it anywhere you want.
furthermore, instead of generating a random number for a, and then floor it, you can also generate a random integer with