Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=203)
-   -   Finding the game root directory (http://forum.fulqrumpublishing.com/showthread.php?t=29963)

salmo 02-24-2012 07:06 AM

Finding the game root directory
 
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

Code:

if (GamePlay is GameDef)
{
      GameDef game = (GameDef)GamePlay;
      gameServer. ...;
}



All times are GMT. The time now is 03:41 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.