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
94
S
33
G
117
Posts: 5,392
Reputation: 75,345

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: draiza, Magistross, R0J0hound and 1 guest