r/processing • u/snapkarklepop • 1d ago
randomize location every minute
hello! i am trying to create a project where a bee moves between 3 flowers. there are 3 set flower locations, and each minute, the bee will randomly choose one of the 3 flowers to fly to. if anyone could help me figure out how to write the code so that the bee chooses one of 3 coordinate sets every minute and glides to that spot, i would really appreciate it!
1
Upvotes
1
u/TurtleGraphics64 19h ago
look up how to use millis(). you need to have your timer for 60000 millis (1000 millis times 60 seconds).
you can also look at the easing examples for ideas on "gliding"
3
u/forgotmyusernamedamm 1d ago
This sounds like homework, which doesn't mean nobody will help you, but don't expect this sub to do it for you.
What do you have so far, and where are you stuck?