Edited.
See post #9 -- my post about changes made to the command line.
This is
NOT a packer/launcher. It is also using code that is still in beta. Therefore there is no support for the beta code. There is only about 18 lines of code that is added to the beta code. This particular executable uses r675. If I get responses to this thread I will update it as it goes along. I would give you the code but I use commands from a plug-in for DBPro called STYX that you would have to purchase.
If anyone wants to use this then you will need to use it at your own risk and it should not be used for an official game. Only for testing.
Here is an explanation of what the engine does.
The command:
executefile=X where X is the relative path to executable. A relative path is a path relative to the working directory of the user or application, so the full absolute path will not have to be given.
IMHO, the best way to organize your separate levels is to include the subsequent level folders within the root directory of the very first level of the game and not nesting it in each folder that would be in the files subfolder. Here is an image of an example root folder for the game which would be the startup level.
You will have to manually add these folders to the root folder.
Now, in the trigger zone or even the main script of an entity you will have a line similar to the following.
:state=1:executefile=..\level02\level02_executefile.exe,state=2
This line will execute the new level and end the current level.
You will notice the
..\ in front of the sub-folder that contains the executable file. Most of you probably know what this means. Since the path needs to be relative to the default or working directory, we need to let the command know that we need to
go back one directory.
I tested this with the above script and it works fine.
So, I have been seeing a lot of people asking about this and because it was quite simple to do, I decided to provide it for those would be interested.
You will notice that the first thing that happens is the current game quits and goes back to the desktop and then the next loads. Therefore, it is noticeable. It is impossible to get it to merge smoothly. That is why Lee made the possibility for more than one level. It merges smoothly without any kind of a break. Of course before you make the transition, you can use huds or whatever to let the player know what is happening in the game.
Personally, I will not be using this method for most of my games as I don't particularly like the game going back to the desktop even if it is for a short while (maybe 1 to 3 seconds). This is just my personal feeling. If I had to do it that way I would like a launcher to do it for me as there probably wouldn't be such a vivid break.
Oh, BTW, the executable is in the download link.
"A programmer is just a tool which converts caffeine into code . . . reminds me….. if I had one more brain cell, I could have a synapse! woo hoo, Sparky!
~I'm the Terry of the Flatlands.