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
59
S
24
G
23
Posts: 928
Reputation: 17,491


Return to How do I....?

Who is online

Users browsing this forum: Avenged90x, Elliott, Eren, shukra, Voytek and 8 guests