how do i grab the global time from a ongoing campaign?
Posted: Wed Aug 08, 2018 2:59 am
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:
doing only that gives the date where the campaign started.
but if you add this
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)
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;
but if you add this
Code: Select all
currentdate= `STRATEGYRULES.GameTime;
you can also get the date in days (currentdate.m_iDay), months(currentdate.m_iMonth) and years(currentdate.m_iYear)