1. No Profile Picture
Registered User
Devshed Newbie (0 - 499 posts)

Join Date
Mar 2013
Posts
12
Rep Power
0

Timer and visibility help

I have a small question hopefully someone here is able to help me with.

How to make a moving polygon visible and invisible with timer - visible at least 25% of the time and invisible for at least 25% of the time?

Any guidance and help would be greatly appreciated!
2. visible at least 25% of the time and invisible for at least 25% of the time?
What about the other 50% of the time?
Are the times supposed to be random?
3. No Profile Picture
Registered User
Devshed Newbie (0 - 499 posts)

Join Date
Mar 2013
Posts
12
Rep Power
0
Originally Posted by NormR
What about the other 50% of the time?
Are the times supposed to be random?
yeah, a random number should be used.
I'm figuring out how to setup my if conditions right now
4. I still don't understand what happens in the other 50% of the time. visibility is a binary state. It is either true or false which means there is a 50/50 split. Not 25/25/50

Assuming a random number generator that creates an even distribution of numbers in a range, a way to get a 50/50 split is to set boundary in the middle of the range then there will 50% of the random numbers above that boundary and 50% below that boundary.
Different %s can be created by setting more boundaries. Say the range of random numbers is 0-99 and the desired split is 25/25/50 then set the boundaries at 25 and 50. Below 25 for 25%, 25-50 for 25% and above 50 for 50%
Last edited by NormR; December 13th, 2013 at 07:16 AM.