I am finding myself more and more reliant on using For loops for my programming, and this is leading to a problem.
I wrote a short mode that runs my sound board, and it has a method that takes intergers between 1 and 31 and uses the drivers to call the sound board to produce the sound.
It is called like this: self.game.sound_mode.playsound(x)
Now if I want to cycle through each sound, I would like to do something like this:
for x in range(1:32):
The obvious problem is the code one computer executes so fast, the sounds never get made. If I try to use a delay call:
The coil calls get stacked up on top of each other, as fast as the For loop can place them in the stack, and still don't get executed properly.
So is there a way to slow down For loops without resorting to the time.sleep() command, that I understand will bring the game loop to a screeching halt?
When I do my bonus mode, I know I will need to use this delay method so I can count down the bonus lights as I add the bonus to the player score.
PS. California welcomed me back tonight with a 3.5 earthquake!http://earthquake.usgs.gov/earthquakes/eventpage/ci37347128#general_summary