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
36
S
14
G
3
Posts: 263
Reputation: 4,245

Post » Fri Feb 05, 2016 6:56 pm

(floor(random(5))+1) * 2
or
choose(2,4,6,8,10)
B
58
S
23
G
22
Posts: 890
Reputation: 16,790


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot], KailSaisei, Magistross and 10 guests