We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, Maybe it's a dumb question, but is there a way to make a condition before setup() and draw()? (I want to make "Press space to start the game" -game that is in my sketch- ) Maybe I could do it in the draw() too but I don't know how to do it.
Thank you in advance. :)
Answers
How are you going to print the message if you haven't called setup()?
The traditional way is to set a flag in setup, check it on draw, draw the "press start" until the key is pressed and the flag is changed.
Keypressed () in the reference.
Could you give me an example? I didn't manage to do it :'(
That's what I tried but I made an error when typing curly brackets. That's what I get for trying this so late. Anyways thanks for your intelligent answer to a dumb question. Have a good day.