random

For questions about using Classic.

Post » Thu Nov 10, 2011 5:40 pm

How to make construct pick random number between 1 and 2? It's random(2), right? But it looks that it also pick 0, does it?
B
11
S
3
G
6
Posts: 193
Reputation: 4,234

Post » Thu Nov 10, 2011 5:56 pm

random() is 0-based, so yes. 1+random(2) will give 1 or 2.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests