I'm sure it's not that critical here, but if you are looking to get random
numbers each time, it's suggested that a random seed call is made before
the randomizer. That often uses the timer because specific numbers
will always return the same random seed. This has nothing to do with
your wait time, jut a more random sequence to your animations.
Looks like; math.randomseed( os.time() )
You could in fact throw out the random 1-10 and wait for 1 part, and instead do
something like a random wait between 20-40 second (choose your own time here).
That way you know that the fidget will always happen between that time frame.
Just randomize the wait time -- something like this;
--**--flag that normal animation is occurring--**--
math.randomseed( os.time() )
fidget_delay[e] = (math.random(1,20) * 1000) + 20000 -- this returns 20-40 seconds
if GetTimer(e)>fidget_delay[e] then
--**-- flag for fidget and not normal animation--**--
----- go go go inspector gadget! Er, I mean fidget soldier, fidget!
----- reset timer and etc, go back to normal stance--- repeat