#need an example

1 messages · Page 1 of 1 (latest)

prime quest
#

I need a script file that runs a function forever

primal dock
#

like tick.json?

prime quest
#

Nah
Tick json is laggy

#

There's a way to run a function forever using scripting

olive anchor
#

yes, you can use this function:

world.events.tick.subscribe((eventData) => {
  // Your code here
});```
It will run every tick. You can also use

System.runSchedule(() => {
// Your code here
});

Remember you need to import the appropriate classes `world` & `System` for these to work.