# How to random Room?

#### pangloy

##### Veteran

Good Evening

I have 4 maps.
- Map A is World map. and have "Blank area for Room".
- Map B as small as "Blank area for Room".
- Map C as small as "Blank area for Room" .
- Map D as small as "Blank area for Room".

How to random room every time I enter and leave and enter room
Thank you. Love you.

#### mlogan

##### Global Moderators
In your event that transfers you into the room, set a variable equal to random 1-3. Then use conditional branches. If variable = 1, it transfers you to the map of room B. If variable - 2, it transfers you to the map of room C.

#### CodeHunterEx

##### Hunter of the Perfect Code
In your event that transfers you into the room, set a variable equal to random 1-3. Then use conditional branches. If variable = 1, it transfers you to the map of room B. If variable - 2, it transfers you to the map of room C.

That is also how I would accomplish this too.

Create a random value between 1 and the number of rooms and then depending on the value recieved go to room B, C, D .... etc.

if value == 1 transfer to room b
if value == 2 transfer to room c
if value == 3 transfer to room d
etc.

Thank you all.

#### Wavelength

##### MSD Strong
Extra note: If "Room" as seen on World Map A is an event sprite, you can set the random variable in advance, and then you can have three different pages, one for each value of the variable (1, 2, or 3), which contain a different graphic to display, and warp you to the appropriate version of the Room (B, C, or D) when touched.

#### pangloy

##### Veteran
If "Room" as seen on World Map A is an event sprite,

Can we set whole room (size more than 1 block) grouping in 1 sprite??

#### Andar

##### Veteran
the pixel size of a sprite doesn't matter, it's the structure (3x4 cells of identical pixel size) that matters to a sprite.
just check the big monster sprites...

Thank you

### Latest Profile Posts

Mod name: "[Game name] Gameplay Overhaul"
What they actually mean: "Here is a mod that makes the game harder."
I decided to reinstall one of my most favourite game of all times, Gothic 2. Time to get back to Khorinis!
So much game make... I needs to rest. The foods call.
-Casino with bunnysuit
Monday December 6th 2021 at 7PM Hawkzombie will stream A Thief's Voyage on his Twitch.

Hawkzombie Twitch

Check it out.​