#How do you make a timer?
1 messages ยท Page 1 of 1 (latest)
a timestamp in the future - current timestamp piped into a Get Formatted Time chip
can you send an image of that? I'm a visual learner so it's gonna be hard for me to know what to do
what am i supposed to wire them too ๐
and text is needed too
subtract, time get universal seconds or instance get lifetime, add, get formatted time
But I also want it to begin counting when the game starts too
thank you
# start of the python pseudocode execution
future_timestamp = instance_get_lifetime() + 20
def Update30Hz(dt):
time_remaining = future_timestamp - instance_get_lifetime()
text_set_text(get_formatted_time(tostring(time_remaining), "m\ms\s"))
is there a way i can display it on the hud @sudden wadi
the method presented to you isnt the most ideal since all you really need to get is the future timestamp when the game will end
to get a future timestamp you just add to Instance Get Lifetime
isnt this a speedrunner clock, the one that sops only when player is finished?
the timer shown in the original post image isnt a speedrun timer
ah
the image is just refference
in that case whenever the run starts you just save the current timestamp and then use it to subtract from the current timestamp when the runner has reached the end
which i did in screenshot
Is there a way you can make the clock show on the hud tho?
doing it rn
Please make sure to save that data to a cloud variable though in the end. That way you can keep track of their current time.
and I also want it to start counting when the game is started too
If you want to that is. For a new personal best scenario
what the button for tho?
you can disregard it
that is if you use game rules and the timer starts whenever that starts
are you working on the part where it shows on the hud?
yea I'm using game rules
ye
it's a bit big
oh ok
couldnt you just like, repeatedly update the center top hud element to be whatever the subtract equation results to?
that would go for every type of timer
ones placed in the world, one in the subtitles, whatever
^ should work
you dont need all that
shows minutes:seconds
thank you
just Get Formatted Time with the appropriate format will do
i forgor it existed
my preferred format for a speedrun timer would be m:ss.fff
holup
making another system?
I do read
here you go then
is the "timer active" the hud elements or bool variables
bool variable
bool variables
its there to prevent updating the hud element for no reason
also if youre in a beta room use the Update event instead of Update 30Hz
also don't forget to connect update to the "if player is valid and local" i forgor to connect it back
room that i'm using for this has beta enabled
when you configure the "event receiver" you just select "Update" instead of "Update 30Hz"
is it the mins:secs timer?
minutes:seconds.miliseconds
so something like 6:42.9124
most speedrun timers use that format
the fourth decimal place is useless because the timestamps arent that precise
all of these circuits will make that timer?
yes, left button activates the timer, right button stops it
you can switch buttons for trigger zones if you wanna
I was gonna do it ends when the game ends
thanks for this ima do this when i have time
configure "event receiver" and choose "On game end"
ik how to use event recievers ๐
just making sure
most people who ask here don't know how to configure stuff sometimes
๐
@sudden wadi just ran into a problem
start time and end time variables are float variables
oh
so is active time?
start time and end time are floats, timer active is bool
bruh my internet went out as I was making the system luckily i have my auto save backups on 1 minute
i gotta do it all over again ๐
red = bool (true/false)
blue = float (numbers with decimal, 1.24 for example)
green = int (whole number, 1,2,3,6,etc.)
yellow = player/object/vector/quaternion (here only player)
purple = string (text)
its not counting
screenshot the chips
check error message
maybe you forgor something
its in losgs right?
yes
did you configure the hud constant to "upper right"?
no
try it
is it required to be like that?
hud constant can only show text if they're not main or secondary (if i'm not mistaken)
also, are you sure that you started the timer?
its working
nice
you can configure the hud constant to change colors
also you can use "floor to int" chip and connect these 2 inputs so the middle number of the hud will show seconds
oh alr i'll do that
is there a way you can show this on something so people know their final time?
when you end a timer you just set some text to "end time"
wdym?
do i wire the text to anything?
then you connect the texts "set text" inputt to the "set element hud enabled" (the one that stops the timer)
can i use a message chip?
you can use subtitle but it will how it only for some time, not forever
ik im pretty sure you can change the delay
showing it forverer will be a bit annoying
i'm not gonna do that lol
kk
if i want the time to show for all players do i just add an get all players and list get element chip?
record of 1 person for everyone?
or personal time for everyone?
i want the time to be the same for every person
is there a way you can make the subtitle display the final time?
it already dsplays final time
"end time" is final time
this will show final time of the guy who finished to everyone
do i do this seperately or do it with the chips?
you connect the "for each" chip to the last chips in the sequence that ends the timer
to this
ik but with these ones
oh ok
you can connect "end time" from earlier instead of copying
is there a way you can make it display the min:sec timer thats the one i'm using
change "format" input of the "get formated time" chip to "mm:ss"
oh alr
is this optional or required?
optional but it's better than making a separate chip when you already have it nearby
can bool varibles be wired to multiple circuit?
every variable can be wired to multiple circuits
all outputs (except exec) can be connectted to multiple inputs
all input can connect to only 1 output (except exec)
thanks this helped out a lot can you help me with my next post you're the most helpful person in this channel
before that, read this to better understand chips
really useful for newbies
it's not gonna take long prob, its just the basics of recrooms insides
which side of the bool varible I wire
wire is something that connects an input andd an output, it's not a part of some chip
no message showed up ๐ญ
you wire "end time" variable to "get formated time" "universal seconds" input
like this?
yea i js noticed that ๐
i don't want it to just say the final time i want it like "Your final time: 2:01"
string format
"format" input is "Your final time: {0}"
"element" input is connected to "get formated time"
and connact allat to the subtitle
send image pls
can i get an image of it?
i saw the message too late cause my discord moving slow as hell
๐
can you help me in my new post
This method counts upwards
Ye, thats what timer does (atleast the speedrun one)