3 Separate Random Timers Fire at Same Time
Hello, Gang. I currently have three actors that enter into a scene based on random timers in each of them. If they are "destroyed" or pass off screen on the other side, they recycle back to their original positions.
A strange behavior that I am noticing is that, sometimes, their random timers become synced causing 2 to come on screen at the same time. I tried to alleviate this by alternating their timers (Ex. Actor one every random(30,60) seconds enters. Actor Two every (35,65) seconds enters, etc.)
Does anyone have a method to get the random number generation to use different seeds so that they don't sync up? I'd prefer not to use a table. Thanks.
A strange behavior that I am noticing is that, sometimes, their random timers become synced causing 2 to come on screen at the same time. I tried to alleviate this by alternating their timers (Ex. Actor one every random(30,60) seconds enters. Actor Two every (35,65) seconds enters, etc.)
Does anyone have a method to get the random number generation to use different seeds so that they don't sync up? I'd prefer not to use a table. Thanks.
Best Answer
-
GreenHavenGames Posts: 62

Answers
What I am looking for is some way to alter the random number generating algorithm to use a different seed number for its calculations. With this change, the random numbers would have a much lesser chance of syncing up.