GameMaker Transition to Random Room [SOLVED]

J

jiminy123

Guest
Hey, I want to make my room transition teleport the player to a random room. So when he steps on the transition object he can end up in multiple different rooms. The code I am trying is


/// Initialize

target = R(irandom_range(1,5));
xx = 140;
yy = 400;


where my rooms are called R1,R2,R3,R4,R5... however this does not work.

anyone know how I can get it to target a random room?
 
J

jiminy123

Guest
Thank you so much, been stuck with this for about an hour. Works now :D
 
Top