Hello, i need help for loading env file in DLC with script after time played in game .
i have this for take time passed in game by consol (type: "timebox")
Now, this script not work
i have this for take time passed in game by consol (type: "timebox")
Code:
exec function timebox()
{
var message : string;
var gameTimeDays : string;
var gameTime : GameTime;
var gameTimeHours : string;
gameTime = theGame.CalculateTimePlayed();
gameTimeHours = (string)(GameTimeDays(gameTime) * 24 + GameTimeHours(gameTime));
message = message + " " + gameTimeHours;
theGame.GetGuiManager().ShowUserDialogAdv(0, "gameTimeHours", message, 0, UDB_Ok);
}
Now, this script not work
Code:
statemachine class ChangeEnvironmentDefinition
{
private function UpdateEnvironment()
{
var gameTimeDays : string;
var gameTime : GameTime;
var gameTimeHours : string;
var environmentautumn : CEnvironmentDefinition;
var envID : Int32;
gameTime = theGame.CalculateTimePlayed();
gameTimeHours = (string)(GameTimeDays(gameTime) * 24 + GameTimeHours(gameTime));
environmentautumn = (CEnvironmentDefinition)LoadResource( "dlc\dlcuphoenix\data\environment\definitions\ureal\ureal_novigrad_sunset.env\ureal__novigrad_autom.env", true );
if (gameTimeHours > 70)
{
envID = ActivateEnvironmentDefinition(environmentautumn, 1000, 1.0, 1.000000);
theGame.SetEnvironmentID(envID);
}
}
}
Last edited: