playMaker

Author Topic: [Solved] Load random scene on game launch  (Read 1425 times)

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
[Solved] Load random scene on game launch
« on: December 05, 2018, 10:24:39 PM »
Hi !

I have 20 scenes on my game. I wanna load random scene on game launch.
How can I do that ?

Edit : Also, I wanna random scene on when clicked on NEXT button on Gameover UI. How to do it ?

Thanks
« Last Edit: December 07, 2018, 08:07:24 PM by heavygunner »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Load random scene on game launch
« Reply #1 on: December 06, 2018, 04:20:17 PM »
Hi.
You can use load scene  and set by name, then have an array with the scene names.
the use array get random. and use the variable result on the load scene.

heavygunner

  • Sr. Member
  • ****
  • Posts: 344
Re: Load random scene on game launch
« Reply #2 on: December 07, 2018, 06:49:20 AM »
Problem is, Where should i write load scene FSM?
I have 20 scenes. In which scenes should I write?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Load random scene on game launch
« Reply #3 on: December 07, 2018, 10:57:29 AM »
Hi.
Have a 'Main' scene that will always be there.
in there you can have the fsm to load one of the 20 scenes.

Use load scene Async and set to additive.