Yesterday I tried making one of my actors change palette via a random chance. Sounds easy right? - just use ifnd or randvar?
Well here's the problem, I've used these within "eventloadactor" so it happens before the actor is alerted (as that'll look stupid seeing my actor change colour before your eyes) but then I noticed something which ruins everything - the randvar / ifrnd / basically the random number generater isn't very random at all.
![:blink:](https://forums.duke4.net/public/style_emoticons/default/blink.gif)
The EXACT same actor will always be the different coloured one. In my test map, in the 3rd room, the actor near the back wall will ALWAYS be the coloured one!
No matter how many times I restarted the map or even restart the game the random number generator makes that actor the coloured one.
I don't know much about random number generators but from this I could assume that its a series of numbers that are fixed into the source code and the game just moves along these numbers every tic or once a number has been called and it starts at the first number upon map fully load.
Unfortunately this makes things predictable and have noticed this in the past but shrugged it off as super coninsidence but now it sticks out and its ruining my "random encounter" of this colour change.
Is there anyway around this by using some other form of "random numbering" or / and are there plans to make this generator more random? Perhaps not have it restart upon each map and let it continue where it left off? Have it start active right from the first intro movie since its not humanly possible to run through the movies and start a game at the exact tic of a second each time, or have it start a number ahead based on the seconds and milli seconds of the computer's clock or something.
Again, I don't know anything about random number generators so I don't know if anything can be done or if anyone actually wants to do anything about it.
It would be really helpful and fun to not have things set so fixed for something meant to be random.