In-LUA file navigation
Posted: Tue Mar 09, 2010 2:33 pm
Ok, so we're all familiar with the line found in the Mission scripts that goes like so:
ReadDataFile("dc:HFV\\HFV.lvl", "HFV_conquest")
but I'm wondering, how would you change this to get it to reference the script in a different folder in the addon folder? Such as loading
MJE\\MJE.lvl, "MJE_conquest" from this script? It's possible to load the stock missions from an addon script in this manner; that's how I made the lazer tag mod. That of course is achieved by removing the "dc:" part. But how would you navigate backward to the addon folder and then forward to the desired mod map folder within addon, using LUA code?
...I think I've already tried /, //, ..\, *\, **\, and none of those work for backward file navigation)
calling all LUA programmers...
ReadDataFile("dc:HFV\\HFV.lvl", "HFV_conquest")
but I'm wondering, how would you change this to get it to reference the script in a different folder in the addon folder? Such as loading
MJE\\MJE.lvl, "MJE_conquest" from this script? It's possible to load the stock missions from an addon script in this manner; that's how I made the lazer tag mod. That of course is achieved by removing the "dc:" part. But how would you navigate backward to the addon folder and then forward to the desired mod map folder within addon, using LUA code?
...I think I've already tried /, //, ..\, *\, **\, and none of those work for backward file navigation)
calling all LUA programmers...