I am trying to solve this exercise but i don't get the solution.
Randomly the computer has to choose one of the Arrays as the “best” number. In the window I need to have a message that shows what the array is and which the sketch considers the best. These should always change.
I hope so much someone can help me, I have an exam soon...
This is my code but I am doing something wrong.
Thanks!
float [] HelloArray= new float [int(random(5,11))];
I would like it to move the wings and then just to move a little bit in the air.
I don't know what I am doing wrong, but this is the code: my butterfly just moves like going crazy! That's no good. I would like to keep the frameRate at 60, I don't want to touch that.
I am trying to solve this problem, that seems easy at first sight but I guess it's not that easy for me.
I want to move this image to a random location at Mouse Click. Do you have any idea about what am I doing wrong?
This is what happens: When I click the first time, the image it changes position to a random location and everything seems fine. But then, when I click again, it moves randomly for a moment to a new position but immediately after it goes back to the previous location.
I cannot solve this problem: I have to create a sketch with a button. When I click on the button, I have to put in the window, the time that has elapsed since the sketch started. Every time the button is pressed a new time is posted, but the time doesn’t change until the button is pressed.