Code: Select all
class LevelInfo extends ZoneInfo native nativereplication;
var float TimeSeconds; // Time in seconds since level began play.
I did not find any update mechanism in the script code but a statement in this thread:
So it seems to be updated by the engine, ok. But what kind of seconds - game or real seconds - does it contain? From my tries I've noticed that it contains game seconds, but in above mentioned tread is an opposite statement:anth wrote:Level.TimeSeconds is updated in ULevel::Tick
Second question is about controlling that variable: it seems not to be replicated but managed by the client - it starts always at 0 every time I join the server. Because I want to use "PlayerReplicationInfo.StartTime" (what is set by server to its Level.TimeSeconds) on client, I need to know server's Level.TimeSeconds to calculate the play time. Is there a way to fetch this?Feralidragon wrote:Level.TimeSeconds is always accurate no matter how slow or fast the game is: 1 second interval is really 1 second.