Loading a level from a published file

Posted By: exile

Loading a level from a published file - 10/03/15 22:36

Hey guys,

I am trying to get a published game to load a map from a text file. Essentially I have a text file which looks like this;

Map=test.wmb
Sky=skybox+6.tga
Music=testMusic.ogg

Now when I load the game up from SED it loads just fine, however when I publish the game it can't find the test.wmb file. From what I can tell A8 will combine the maps curing the publishing process. What I am eventually trying to do is have the published game look in the Maps directory and populate a list with any sub directories in that directory. This is so I can output the results to an internal "maps" string which will be used to show the player which maps are available on their system. Then when the player selects a Map, the game will navigate to the selected map directory (Maps>Arena) and pull the map.config file which will tell the engine to load the selected map. Any ideas on how to achieve this? Again, the way I have it set now works perfectly but only when it isn't published. Any ideas will be appreciated. Thanks again!
Posted By: exile

Re: Loading a level from a published file - 10/03/15 22:51

Just so you know, this is so I can add more maps in the future, also so users can share their own created maps.
Posted By: Dico

Re: Loading a level from a published file - 10/04/15 00:18

you need to add this line to your script :

STRING* bind_my_file = "test.wmb";

then your map will be ressorsed to wrs laugh
Posted By: exile

Re: Loading a level from a published file - 10/07/15 23:24

Hey Dico,

Thanks for the tip, the only problem is it still doesn't allow me to run WED generated levels outside of the published game. Remember, users will be able to make their own maps. But again thank you for the suggestion, this works well while developing for the time being
© 2024 lite-C Forums