How to put scores into entity names?

How to put scores into entity names? - Person taking white paper from folder

If some player has a score of S in objective O, how can I summon an armor stand with the name Score: S?



Best Answer

You cannot do so directly. You will instead need to have separate commands for each and every possible score. For larger amounts this would not be feasible:

/execute @a[score_OBJ_min=1,score_OBJ=1] ~ ~ ~ /summon ArmorStand ~ ~ ~ {CustomName:"Score: 1"}
/execute @a[score_OBJ_min=2,score_OBJ=2] ~ ~ ~ /summon ArmorStand ~ ~ ~ {CustomName:"Score: 2"}
/execute @a[score_OBJ_min=3,score_OBJ=3] ~ ~ ~ /summon ArmorStand ~ ~ ~ {CustomName:"Score: 3"}



Pictures about "How to put scores into entity names?"

How to put scores into entity names? - Crop unrecognizable male putting staked jeans into opened cardboard container before renovation while standing against white wall in daylight
How to put scores into entity names? - Stacks of raw packed cigars in fabric
How to put scores into entity names? - Young woman worker in casual clothes standing in light cafe and putting sign with word open on door



How do you add entity to scoreboard?

Minecraft: Setting up and using a scoreboard in Bedrock Edition
  • Open the in-game chat window where commands are normally entered.
  • Type "/scoreboard objectives add" without the parenthesis, players will then have a few options to choose from with regards to what objective they'd like to add to their scoreboard.




  • Link Entities Based on Scoreboards




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Anete Lusina, Karolina Grabowska, Thibault Luycx, Tim Douglas