#How do you make a timer?

1 messages ยท Page 1 of 1 (latest)

tranquil rapids
#

I want to make an RR game that is speedrun friendly, can someone tell me how to?
The reference image is the timer from boss central.

raven lagoon
#

a timestamp in the future - current timestamp piped into a Get Formatted Time chip

tranquil rapids
raven lagoon
#

no

#

from what i had said alone you can extract like 4 chips that you will need

tranquil rapids
#

and text is needed too

raven lagoon
#

subtract, time get universal seconds or instance get lifetime, add, get formatted time

tranquil rapids
sudden wadi
#

somethine like this for the basic

tranquil rapids
raven lagoon
#
# 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"))
tranquil rapids
# sudden wadi

is there a way i can display it on the hud @sudden wadi

raven lagoon
#

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

sudden wadi
raven lagoon
#

the timer shown in the original post image isnt a speedrun timer

sudden wadi
#

i think he wants a speedrunner clock

raven lagoon
#

ah

sudden wadi
#

the image is just refference

raven lagoon
#

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

tranquil rapids
#

Is there a way you can make the clock show on the hud tho?

trail root
#

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.

tranquil rapids
trail root
#

If you want to that is. For a new personal best scenario

tranquil rapids
#

what the button for tho?

raven lagoon
#

you can disregard it

#

that is if you use game rules and the timer starts whenever that starts

tranquil rapids
# sudden wadi

are you working on the part where it shows on the hud?

tranquil rapids
sudden wadi
#

it's a bit big

tranquil rapids
#

oh ok

raven lagoon
#

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

sudden wadi
sudden wadi
raven lagoon
#

you dont need all that

sudden wadi
#

shows minutes:seconds

tranquil rapids
raven lagoon
#

just Get Formatted Time with the appropriate format will do

sudden wadi
#

i forgor it existed

raven lagoon
#

my preferred format for a speedrun timer would be m:ss.fff

sudden wadi
#

holup

tranquil rapids
raven lagoon
#

no, theyre showing you a better way

#

which you would already know if you read

tranquil rapids
#

I do read

raven lagoon
sudden wadi
tranquil rapids
# sudden wadi

is the "timer active" the hud elements or bool variables

raven lagoon
#

bool variable

sudden wadi
raven lagoon
#

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

sudden wadi
#

also don't forget to connect update to the "if player is valid and local" i forgor to connect it back

tranquil rapids
#

room that i'm using for this has beta enabled

sudden wadi
tranquil rapids
sudden wadi
#

so something like 6:42.9124

#

most speedrun timers use that format

raven lagoon
#

the fourth decimal place is useless because the timestamps arent that precise

tranquil rapids
sudden wadi
#

you can switch buttons for trigger zones if you wanna

tranquil rapids
#

thanks for this ima do this when i have time

sudden wadi
tranquil rapids
sudden wadi
tranquil rapids
#

@sudden wadi just ran into a problem

sudden wadi
tranquil rapids
#

so is active time?

raven lagoon
#

start time and end time are floats, timer active is bool

tranquil rapids
#

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 ๐Ÿ’€

sudden wadi
#

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)

tranquil rapids
#

its not counting

sudden wadi
tranquil rapids
#

im also getting an error noise too

sudden wadi
#

maybe you forgor something

tranquil rapids
#

its in losgs right?

sudden wadi
#

did you configure the hud constant to "upper right"?

tranquil rapids
#

logs are empty

sudden wadi
#

try it

tranquil rapids
#

is it required to be like that?

sudden wadi
#

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?

tranquil rapids
#

its working

sudden wadi
#

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

tranquil rapids
#

oh alr i'll do that

#

is there a way you can show this on something so people know their final time?

sudden wadi
sudden wadi
#

it will display the final time

tranquil rapids
#

do i wire the text to anything?

sudden wadi
#

then you connect the texts "set text" inputt to the "set element hud enabled" (the one that stops the timer)

sudden wadi
tranquil rapids
sudden wadi
#

showing it forverer will be a bit annoying

tranquil rapids
sudden wadi
#

you do you ig

#

ima show u chips

tranquil rapids
#

kk

#

if i want the time to show for all players do i just add an get all players and list get element chip?

sudden wadi
#

or personal time for everyone?

tranquil rapids
sudden wadi
tranquil rapids
# sudden wadi

is there a way you can make the subtitle display the final time?

sudden wadi
#

"end time" is final time

#

this will show final time of the guy who finished to everyone

tranquil rapids
sudden wadi
#

to this

sudden wadi
tranquil rapids
sudden wadi
#

you can connect "end time" from earlier instead of copying

tranquil rapids
#

is there a way you can make it display the min:sec timer thats the one i'm using

sudden wadi
tranquil rapids
sudden wadi
tranquil rapids
sudden wadi
#

all outputs (except exec) can be connectted to multiple inputs

#

all input can connect to only 1 output (except exec)

tranquil rapids
sudden wadi
#

really useful for newbies

#

it's not gonna take long prob, its just the basics of recrooms insides

tranquil rapids
#

which side of the bool varible I wire

sudden wadi
tranquil rapids
#

no message showed up ๐Ÿ˜ญ

sudden wadi
tranquil rapids
#

like this?

sudden wadi
#

yes

#

but

tranquil rapids
tranquil rapids
# sudden wadi

i don't want it to just say the final time i want it like "Your final time: 2:01"

sudden wadi
#

and connact allat to the subtitle

tranquil rapids
#

i saw the message too late cause my discord moving slow as hell

sudden wadi
#

basically what i said

tranquil rapids
#

๐Ÿ‘

tranquil rapids
sturdy ridge
sudden wadi