View Full Version : Finding the game root directory
salmo
02-24-2012, 07:06 AM
I need to find the game root directory via script. Can anyone point me in the right direction?
FG28_Kodiak
02-24-2012, 07:39 AM
Via Registry :rolleyes:
41Sqn_Banks
02-24-2012, 08:48 AM
There is a function of the IIRC GameDef that allows to translate a path string that uses the "$home" or "$user" (e.g. "$user/missions/test/bla.mis") variables into the system path (e.g. "C:\\users\\...\\missions\\test\\bla.mis"). The "$home" variable points to the game install directory.
Not sure if you can access this function from the AMission context. Try this to get to GameDef
if (GamePlay is GameDef)
{
GameDef game = (GameDef)GamePlay;
gameServer. ...;
}
vBulletin® v3.8.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.