Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: heavygunner on October 17, 2018, 01:52:47 PM

Title: Crating multiple levels from single scene
Post by: heavygunner on October 17, 2018, 01:52:47 PM
Hi !

I have a scene where it will spawn 5-10 cubes randomly. Once player collected cubes, level will be completed.

What I want is, When scene run first, it should be Level 1, Once is passed, same scene should be loaded as Level 2, this should be continued. So, I can make infinite levels.

How to do it?
Title: Re: Crating multiple levels from single scene
Post by: waveform on October 17, 2018, 02:59:08 PM
well, in this case probably best way is make a prefab for each level
Title: Re: Crating multiple levels from single scene
Post by: heavygunner on October 17, 2018, 03:26:51 PM
well, in this case probably best way is make a prefab for each level
I said above game concept is just for example. If i want 1000 levels, I have to make 1000 prefabs ?

A long ago, I has an Unity source code. It has an option inspector "Number of Levels to Create". If you put 1000 and hit enter, It will make 1000 levels while playing. But, There will be only single scene in project
Title: Re: Crating multiple levels from single scene
Post by: Thore on October 17, 2018, 04:25:47 PM
You take your level integer, use that to populate the scene, and probably show some UI text that this is level X. After the player completed it, you add +1 to level, perhaps do some cleanup (pool/destroy objects, reset things), rinse and repeat.

If objects have some starting position, initialisation, and can be moved around etc. you can make a RESET (example name) global event, which you might add to the START state. At the end of one level, broadcast RESET and everything is set to the start state.
Title: Re: Crating multiple levels from single scene
Post by: djaydino on October 17, 2018, 05:35:33 PM
Hi,
Depending on how many things needs to be changed, i would go for Xml (Datamaker)

One reason for me :

It would be easier to input the data.
And it would even be possible to make an "editor automation'' to add all the object locations to a txt file with a single press of a button (maybe even directly to add to an xml)