Threef

Random rooms

Jan 21st, 2015
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [create]
  2. room_list=ds_list_create()
  3. ds_list_add(room_list,room1,room2,room3)//You can add up to 16 rooms in one function, if you need more then add more:
  4. //ds_list_add(room_list,room17,room18,room19)
  5.  
  6. [your change of rooms]
  7. if(!ds_list_empty(room_list))
  8. {
  9. ds_list_shuffle(room_list)//Shuffle to get random rooms
  10. room_goto(ds_list_find_value(room_list,0))//Change room
  11. ds_list_delete(room_list,0)//If I remember right this will still be executed
  12. }
Advertisement
Add Comment
Please, Sign In to add comment