# Possible random number of area in mission.sqm ?

## 4 posts in this topic

Is it possible ?
Randome number for use in variable  a and b in class marker

Example

```rand = random(from x, to y);
a = rand;
b = rand;```

##### Share on other sites
6 hours ago, DEN said:

Is it possible ?
Randome number for use in variable  a and b in class marker

Example

```
rand = random(from x, to y);
a = rand;
b = rand;```

_a   = (2 + (round (random 3)));

_b   = (1 + (round (random 4)));

using just random will make a decimal number, round will round that to the nearest whole number, there is also floor (round down) and ceil (round up)

• 1

##### Share on other sites
15 minutes ago, red_ned said:

_a   = (2 + (round (random 3)));

_b   = (1 + (round (random 4)));

using just random will make a decimal number, round will round that to the nearest whole number, there is also floor (round down) and ceil (round up)

Thank you

##### Share on other sites
23 minutes ago, DEN said:

Thank you

np

remember all private variables (local to that script) must start with an underscore or the server will think it a global variable

• 1

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account