Jump to content
Sign in to follow this  
_qor

Time stamp

Recommended Posts

Hey,

there is a Combat Count News board in my mission which releases enemy and friendly death toll.

So this is working for each attack of the enemy. But to distinguish between all those releases I want to add a time stamp to each CCN release.

Assuming I would use the date code to handle it

http://community.bistudio.com/wiki/date

But how do I save a certain time? Calling the date by script would always return the current time.

So I want to call the date code and to save the returned numbers to another variable to call it up later.

thanks in advance

Edited by _qoR

Share this post


Link to post
Share on other sites

If you want to save a single date, use a specific variable for it:

timeStamp = date;
sleep 1;
hint str timeStamp;

if you want to save multiple times and be able to add onto it, create an array:

if (isNil "timeStamps") then {
timeStamps = [];
};

timeStamps set [count timeStamps,date];
sleep 1;
hint format ["Timestamps: %1\nFirst timestamp: %2\nCurrent timestamp: %3",timeStamps,timeStamps select 0,timeStamps select (count timeStamps - 1)];

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×