#is there a way to obtain world time like q.life_time

1 messages · Page 1 of 1 (latest)

austere jewel
#

hi

dreamy pebble
#

not possible, unless u mark the entity with da date

#

for world, it's prob the ```js
world.getAbsoluteTime()

austere jewel
#

thanks

#

and how do i make a scoreboard dummy

dreamy pebble
#

only thru /scoreboard

austere jewel
#

damn

#

so i cannot obtain values of scoreboard dummies via gametest

dreamy pebble
#

can

austere jewel
#

world.scoreboard.getScore(world.scoreboard.getObjective("worldtime")

#

i tried doing this

dreamy pebble
#

creating a dummy is just thru /scoreboard

austere jewel
#

but they said they need 2 args

dreamy pebble
#

objective and participant

austere jewel
#

yea so whats the participant

dreamy pebble
#

the /scoreboard players

#

part

austere jewel
#

so i put dummy

#

("worldtime","dummy")

dreamy pebble
#

ye, and who's on sidebar

austere jewel
#
world.getDimension("overworld").runCommandAsync(`scoreboard players set dummy worldtime ${worldtime})}`)
    world.getDimension("overworld").runCommandAsync(`title @a actionbar ${world.scoreboard.getScore(world.scoreboard.getObjective("worldtime"),"dummy")}`)
#

it says native type conversion failed

dreamy pebble
#

const sBoard = world.scoreboard
const objective = sBoard.getObjective('worldtime')
const participant = objective.getParticipants().find(({ displayName: n }) => n === 'dummy')
const timeScore = objective.getScore(participant)
austere jewel
#

thanks

dreamy pebble
#

np

#

why do u need that scoreboard if u can directly get the number from world.getAbsoluteTime()

austere jewel