#How can I execute a command every 1 second and another every so often?

1 messages · Page 1 of 1 (latest)

rugged fern
#

is that I want to do 2 systems of that with JS but I don't know much about JS 😿

#

I had a script from a long time ago but now it doesn't work anymore

world.events.tick.subscribe((evd) => {
  if (evd.currentTick % 20 === 0) {
    world.getDimension('overworld').runCommand('function scoreboard/time');
  }
});
modest scroll
#

use system.runInterval

#
import { system } from "@minecraft/server";

system.runInterval(() => {
  //...
}, 20);
rugged fern
#

Oh ok

#

Thx