playMaker

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

heavygunner

  • Full Member
  • ***
  • Posts: 161
    • View Profile
[Solved] Load random scene on game launch
« on: December 05, 2018, 08: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, 06:07:24 PM by heavygunner »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4436
    • View Profile
    • jinxtergames
Re: Load random scene on game launch
« Reply #1 on: December 06, 2018, 02: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.
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions

heavygunner

  • Full Member
  • ***
  • Posts: 161
    • View Profile
Re: Load random scene on game launch
« Reply #2 on: December 07, 2018, 04: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: 4436
    • View Profile
    • jinxtergames
Re: Load random scene on game launch
« Reply #3 on: December 07, 2018, 08: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.
FOR HIRE:Playmaker/C#

Playmaker Samples <-------------> Easy Exporter <---------------------> TPA Actions