Computer Science Canada applying delay to a specific part of a loop |
Author: | neverstopbelevin [ Thu Nov 18, 2010 7:28 pm ] | ||
Post subject: | applying delay to a specific part of a loop | ||
in my code, im trying to get a maple leaf to appear in a random location and the user must click it to win. the problem is that if i delay the time it takes for a maple leaf to show up, i must delay the movement of the mouse, however I do not want to delay the mouse movement, only the amount of time it takes for a maple leaf to show up.
|
Author: | TerranceN [ Thu Nov 18, 2010 7:37 pm ] |
Post subject: | RE:applying delay to a specific part of a loop |
Create a counter outside your loop and increment it every time your loop goes around. Use an if statement so that once that counter gets above a certain value, it moves the maple leaf and resets the counter back to 0. |
Author: | neverstopbelevin [ Thu Nov 18, 2010 8:08 pm ] |
Post subject: | RE:applying delay to a specific part of a loop |
okay, thats solved |
Author: | neverstopbelevin [ Thu Nov 18, 2010 8:25 pm ] |
Post subject: | RE:applying delay to a specific part of a loop |
thhanks |