Game A Gogo wrote:There's two possible way to do this.
the first method would be using the SaveVars/LoadVars function with GE.
-Create a variable that will hold what level has been accomplished and make sure to place a save group
-at the end of the level, before loading the map,set your variable to the level number plus one (To say the next level will now be active), save your variables with saveVars("Filename",SaveGroup);
-On the map, make sure to create the exact same variable from your level file
-Make the level active depending on the variable and the level numbers, like with an if statement if(ActiveL>2)//Activate level2 script here
Note: This is like if it saves the game so the person can resume the game later when he loads the map file and the file containing the variable is present. To prevent this would be simply reseting the variable and saving it before exiting the map
the second method is more complex, which involves manually saving a file by creating a function to save/load files and set a variable. A longer detour
Users browsing this forum: No registered users and 1 guest