Is it possible to randomise scenes based on distance like it is in BB2? So for example you can randomise 1-5 for 1000 pixels, then a bunch of other scenes for 1000 - 2000 pixels etc?
yes you can make with little code. let dist = this.scene().path().pathPosition(); Settings.dist=Math.round(dist); if(Settings.dist>0 && Settings.dist<5000){ let scn = Math.round(Math.random() *9)+1; //scene 1-10 random this.scene().addLevel(String(scn)); if(Settings.dist>5000 && Settings.dist<10000){ let scn = Math.round(Math.random() *9)+11; //scene 11-20 random this.scene().addLevel(String(scn));
Oh that’s really awesome! Thank you. Where do you place this code? Is there a node specific for the World?
Weboha- you have just taken the possibilities to the next level with this script! Thank you! White dog- load a basic asset.. and delete everything except the start node. Call that asset ‘Level sections’ or something. Now from the advanced section of the nodes get a script node and paste weboha’s code into the ‘innit’ section of the code. That means it will run on ‘initialisation’ of the ‘Level Sections’ asset. Now drag that “Level Sections” asset into your start scene and make sure it’s right at the top of the scene asset list... that means it will run before anything else. Take it easy.
Awesome. Thanks for confirming that. Probably a silly question, but what is the ratio of distance (or pixels) to the grid? For example if your object starts at (0,0,0) and ends at (0,0,1), is that a distance of 1000?