#Making a scoreboard value a js variable

18 messages · Page 1 of 1 (latest)

pastel forum
#

How can I transfer the value of a specific scoreboard of a specific player to a variable? I want to use it in my script. Example: when the script gets triggered, for example through a click with an item in the hand, the scoreboard value of the clicking player gets transfered to the variable, so I can use it later in the script to give the player exactly that amount of diamonds.

snow marshBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

slate smelt
#

can't you just track that value with persistant data using only kubejs and not a scoreboard?

pastel forum
slate smelt
#

you can also track it on both, so once for kubejs for kubejs use and once with a scoreboard for display use

pastel forum
#

Just wanted to know if there is an easy way to do it

slate smelt
#

so you track with persistant data and each time it changes you do something like /scoreboard players set <player name> <name> <score>

#

I don't think so

pastel forum
slate smelt
#

though you can wait and see if other people know

pastel forum
slate smelt
#

and there's an entity death event

pastel forum
#

Ah ok

soft burrow
dusty sequoiaBOT
pastel forum
#

Ok... thats too complicated for me...

#

Thanks anyways