I wanted to run a function 50% of the time, so I was able to do this:
tickcount % 2 = 0
I was also able to use:
unixtime % 2 = 0
Are there other things that I could use, too?
Essentially, I want to run several functions, each with a randomness factor (of 50%), but I want them all to run randomly from each other - which means I can't use tickcount % 2 each time etc...
Any ideas for a newbie? Am I over-complicating something really easy?
Develop games in your browser. Powerful, performant & highly capable.
So you want to "toss a coin" and if it's "heads", then you run the function, correct?
The easiest way is to use condition choose(0,1)=1
If you need a 20% chance for example, then use random(100)<20
OMG, I have used 'choose' so many times for other things. I cannot believe I forgot about this!
Many thanks!