Folder Access Issues

Questions, comments and discussion about the Game Editor development.

Folder Access Issues

Postby bamby1983 » Sun Dec 16, 2012 5:38 am

I created a new sub folder for levels (in the form of .ged files) within the parent game folder and another sub folder for saved games. While I was able to reference .ged files within this sub folder, I was unable to reference the original game file in the parent game folder from the .ged file within the sub folder.

Example:
Parent file Location: Game/Parent_File.ged
.ged file location: Game/Levels/Level_1.ged

I can access Level_1.ged from Parent_File.ged although it is within the Levels folder. However, I cannot access Parent_File.ged from Level_1.ged by typing "../Parent_File.ged" as the file path.Is there any way to access files that are one folder level up?

As for saved games, I created a "save" folder and referenced the save and load file paths as "save/game.sav". However, while saving the game, the game.sav file was created in the original game folder itself (outside the "save" folder). The file loaded the parameters correctly even though I had set the load file path to "save/game.sav". Would anyone know why this occurs?
bamby1983
 
Posts: 112
Joined: Tue Jul 31, 2012 11:36 pm
Score: 8 Give a positive score

Re: Folder Access Issues

Postby skydereign » Sun Dec 16, 2012 6:53 am

bamby1983 wrote:I created a new sub folder for levels (in the form of .ged files) within the parent game folder and another sub folder for saved games. While I was able to reference .ged files within this sub folder, I was unable to reference the original game file in the parent game folder from the .ged file within the sub folder.

I really wouldn't recommend that way if you can avoid it. But this is how gE deals with paths. LoadGame always assumes you are in the directory the first game was loaded from. So if you start at parent.ged, and load dir/child.ged, even though you are playing the game dir/child.ged, you would need to use dir/child2.ged to load the child2 game in the same file.
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score

Re: Folder Access Issues

Postby bamby1983 » Sun Dec 16, 2012 7:30 pm

Thanks! I'll keep all files in the same folder in that case.
bamby1983
 
Posts: 112
Joined: Tue Jul 31, 2012 11:36 pm
Score: 8 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest