Hello,
I was wondering if it's possible to launch a level randomly using the flow system.
For example:
I have my action jump game with 5 level. I want when the player start the game that a random level is loaded (one of the 5 level construct).
Is it possible using flow system? Or other? Can you give me your advice on it?
Thanks
Regards,
SlySly
IGM: Random level choice
● ARCHIVED · READ-ONLY
-
-
Completely possible. Here's how.
Make an all black canvas (using a wallpaper is the easiest way). Make a gadget with six action programs. The first one (and the first active one) should be "Standby" and the rest should named after your levels. Each level action program should turn on a switch for the respective level. Now select standby and for every level-related action program, go to the conditions for switching and set it to "Apply Ratio - 1.00%". It will instantly pick one, and because their percentages are all the same it will pick one at random. You may want to play around with the percentages a little bit, I've found that it can be a tad biased towards whichever one is the first action program in the list but that may just be personal experience.
Then set up your flow chart to go from your black canvas to any of the stages if the right switch is activated. Randomness achieved! -
Hello,
Thanks for your answer.
I just don't understand how a switch can load a level. Can you explain a little more about that?
Is it possible with a main menu too?
Thanks -
Sure. Get three canvases ready and head to the "Flow" tab. Link one to the "Start" field of the flow and link the other two to the first one. Then click on the canvas linked to "Start". Under "Branch Destination Canvases" select whichever canvas you want, and scroll down on the "Branching Conditions" sub-tab. One of the options is "The Designated Switch Was Activated" so you check the box for that, pick whatever switch applies to that canvas, and set it to "On".
When the game loads up it automatically goes from Start to your 1st canvas. Once it gets to the 1st Canvas, it waits for directions on where to go next. Because you have it set up so that it can only move on to the 2nd and 3rd canvases if certain switches are activated it will wait on that 1st canvas until one of the switches is turned on. This happens instantly as your gadget for turning on the switches (which you should make invisible and place on the 1st canvas somewhere) will randomly choose a switch to activate and then the flow reacts and sends you to whichever canvas matches the switch.
Did that help?
Also, it is absolutely possible with a main menu. Would just take some time to set up. You could even have the menu give you the option for all of your stages, and then have a random option at the bottom which would be rather cool. -
Hello,
Thanks Kain! It's perfect!
I tested it and it worked perfectly.
Thanks!