How do I Create Random Intervals/Multiples?

Get help using Construct 2

Post » Fri Feb 05, 2016 6:50 pm

For my game, I am trying to spawn an object at random intervals of 2. How would I create random multiples of 2? I know that random(10) produces any number from 1 to 10 but I want it to produce random numbers from 2, 4, 6, 8, 10 only, nothing in-between. Any suggestions appreciated.
B
37
S
14
G
3
Posts: 263
Reputation: 4,270

Post » Fri Feb 05, 2016 6:56 pm

(floor(random(5))+1) * 2
or
choose(2,4,6,8,10)
B
71
S
30
G
25
Posts: 984
Reputation: 19,503


Return to How do I....?

Who is online

Users browsing this forum: adventurist, Artcadev, Blendi1223, PROxMTswatTR and 25 guests