I wanna make a skript where every player will join and get his time (for example 3 hours) with countdown, but I don't want to set hours, minutes and seconds as certain variable ({min::%player's uuid%} and so on). So is it possible to make this as only one variable? And if it is - how can I make calculation with that (for example 3 hours + 5 hours)
#Player time
1 messages · Page 1 of 1 (latest)
Eeeeh?
You can use playtime expression
Boring
hm, is it possible to set it in format Hh:Mm:Ss?
now it looks like this
idk, tell me?
uh, i see
i'll try
I think it's not that I want
it can show you real time, but not what I want
but it's like a real time
or I don't get you?
Oohh maybe I understand
trigger:
set {_a} to time played of player
set {_t} to {_a} formatted as "HH:mm:ss"
send "%{_t}%" to player```
no error but do not work
Yeah that expression only works for dates, not timespans
You'll have to do the format manually by getting the ticks with skjade or reflect, and then doing math
I believe there's a snippet for it?
something like this might also work
set {_tmp} to unix timestamp of (time played of player from date(1970, 1, 1))
set {_fmt} to unix date of {_tmp} formatted as "HH:mm:ss"
send "%{_fmt}%"
i think that might break for times longer than a day though
you can count the seconds and then division with to make it like h,m,s
wdym?
See the latest snippet
okeeey so what is that?
what is "expr-1.getTicks()/20"?
That's reflect
Like I said, get ticks with skjade or reflect
They're just dividing by 20 to get seconds in that example
So I can't make that I want using just skript?
Bluehf's method may work, but if you want fine control, you kinda need an addon
he said that it might break if time longer than day
he did say that yes
So the best solution for me is to leave it like it is now, where every hour, minute and second is a variables
you can but it's a bit illegal
the usage example is located helpfully in the Middle of all the mess
yoo what it that
i mean the best solution imo is to just get skript-reflect
but blue's monstrosity will also work lol
i'm making a nicer one atm
here's my improved script :)
this looks so difficult for me