Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 02-24-2012, 07:06 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default Finding the game root directory

I need to find the game root directory via script. Can anyone point me in the right direction?
__________________
When one engine fails on a two engine bomber, you will always have enough power left to get to the scene of the crash.

Get the latest COD Team Fusion patch info HERE
Reply With Quote
  #2  
Old 02-24-2012, 07:39 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Via Registry
Reply With Quote
  #3  
Old 02-24-2012, 08:48 AM
41Sqn_Banks 41Sqn_Banks is offline
Approved Member
 
Join Date: Oct 2007
Posts: 644
Default

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. ...;
}
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:28 PM.


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