How do I use random expression without fractional part?

Get help using Construct 2

Post » Sat Aug 13, 2016 8:40 pm

Hi everyone how do i use "random" expression without fractional part?

When i use random expression,it chooses values with fractional part like (73.23321 , 19.49994 , 29.322211)

I want to use without fractional part like (12 , 42 , 94 , 13)

Sorry for bad english.

Thanks.

Example Capx : https://drive.google.com/open?id=0B9xK1 ... Hl6VzYyYjA
B
29
S
14
G
1
Posts: 133
Reputation: 3,216

Post » Sat Aug 13, 2016 8:48 pm

int(random(100))
ImageImageImage
B
71
S
22
G
257
Posts: 3,788
Reputation: 142,692

Post » Sat Aug 13, 2016 10:56 pm

blackhornet wrote:int(random(100))


thanks
B
29
S
14
G
1
Posts: 133
Reputation: 3,216

Post » Sun Aug 14, 2016 12:44 pm

You can also use round(x), ceil(x), floor(x) - depending what you want to do.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests