#How to await real time like setTimeout, and setInterval

1 messages · Page 1 of 1 (latest)

terse lodge
#

I like the methods Script API Made like system.setTickTimeout and System.setTickInterval however i have problems when the server lags. All my timeouts are way longer than they should be and it makes the addon look very slow, even though its just waiting to long because of lag.

So i want a system that will await actual time, instead of tick time so i can make my script look alot better.

grizzled forumBOT
#
Error!

The package doesn't exist on remote (stable).

terse lodge
#

@dense ice can you send the .ts file

#

this code looks very bad

dense ice
terse lodge
terse lodge
terse lodge
#

@dense ice Okay ive redesigned your system, this should be alot safer to use and better documented

vale fernBOT
#
Compiler Output

```prog.ts(4,22): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the ​lib​ compiler option to 'es2015' or later.
prog.ts(57,17): error TS2705: An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your ​--lib​ option.
prog.ts(63,20): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the ​lib​ compiler option to es2015 or later.

steel socket
# terse lodge ?

You still code? It's been a while since you made anything that isn't a Pixelmon clone.

terse lodge
steel socket
steel socket
terse lodge
#

fr

#

i havent posted on my yt in a while

terse lodge
#

ive been working on something very cool for my pokemon addon

#

i probably wont bring back the factions addon tho

terse lodge
steel socket
steel socket
#

@keen tusk

terse lodge
#

no content?

steel socket
steel socket
terse lodge
#

oh

steel socket
#

He doesn't post much on YT lol

dense ice
terse lodge
#

Check the code I sent

astral fiber
#

the most accurate way is looping with await null and feching the Date.now()

#

there is no good way of doing that

terse lodge
#

can you check this

astral fiber
#

what is "this"?

terse lodge
dense ice