How do I have the random expression return an integer

Get help using Construct 2

Post » Tue Nov 25, 2014 1:23 am

I'm trying to make a health system where when something takes damage it could take a random value between 0 and 3 but i want that value to be a whole number, any ideas?
B
3
Posts: 3
Reputation: 181

Post » Tue Nov 25, 2014 1:24 am

int(random(4))
B
92
S
32
G
106
Posts: 5,272
Reputation: 69,455

Post » Tue Nov 25, 2014 2:13 am

you should also check out this page https://www.scirra.com/manual/126/system-expressions
B
42
S
17
G
2
Posts: 850
Reputation: 6,209


Return to How do I....?

Who is online

Users browsing this forum: David181, Shenkai the ssj, tatogame, Yahoo [Bot] and 18 guests