how do i grab the global time from a ongoing campaign?

For technical discussions and help
Post Reply
jaderlemes
Posts: 15
Joined: Sat Sep 23, 2017 11:13 pm

how do i grab the global time from a ongoing campaign?

Post by jaderlemes »

sorry if im posting at the wrong section.
i wanna do some stuff with the current date and hour from a campaign, i thought that XComGameState_TimerData was supposed to be that, but it seems to be the timer from missions.
help

EDIT:
nvm found out how:
first you create the variable:

Code: Select all

local TDateTime currentdate;
doing only that gives the date where the campaign started.
but if you add this

Code: Select all

currentdate= `STRATEGYRULES.GameTime;
then it will give you the current date.
you can also get the date in days (currentdate.m_iDay), months(currentdate.m_iMonth) and years(currentdate.m_iYear)
jaderlemes
Posts: 15
Joined: Sat Sep 23, 2017 11:13 pm

Re: how do i grab the global time from a ongoing campaign?

Post by jaderlemes »

nvm for some reason i cant include `STRATEGYRULES.GameTime in the "easier dark events" mod.
Wtf why? but why it works in "Customize UIEventNotice" mod?
wtf did i not include a game file in the code??
Post Reply