CustomHUD icon indicating copy to clipboard operation
CustomHUD copied to clipboard

Suggestion: Timer variable

Open Aces-and-Jacks opened this issue 1 year ago • 3 comments

So basically I'm suggesting adding a timer variable. That you can change based on when you joined a server, started the game, last slept, ect... I know it may be limited but the main thing I want is for when you joined a server, and a timer starts counting.

I didn't see anyone mention this in issues, nor did I see it as an option in variables.

Aces-and-Jacks avatar Oct 04 '24 21:10 Aces-and-Jacks

Sorry for the long delay. This is technically now possible with the new event variables added in v4.1 (at least when joining a server/world). It's not as elegant as what you propose, and I will add what you proposed.

{{on_join, "{set:join_time, unix_time}"}}
{set:dur, (unix_time - get:join_time) / 1000}
{set:m, get:dur % 3600 / 60} {set:s, get:dur % 60}
{$ get:dur / 3600}:{get:m -zf2}:{get:s -zf2}

Minenash avatar Oct 12 '25 07:10 Minenash

Thank you for getting back to this, and for adding the feature. I don't know if you want this closed or not so I'll leave this open

Aces-and-Jacks avatar Oct 15 '25 05:10 Aces-and-Jacks

I'll leave it open for now until I implement the 'stopwatch' variable, which is basically what you want (at least combined with the events), so it could look like:

{{on_join, "{stopwatch:join:restart}"}}{stopwatch:join}

It's also useful for keeping in mind other events to add

Minenash avatar Oct 15 '25 07:10 Minenash