#teleport entities with same id

1 messages · Page 1 of 1 (latest)

wary swiftBOT
#

i have two entities that have the same random id

execute store result score @s veimod.veichles.spawnID run random roll 0..999999999

summon horse ~ ~ ~ {Tags:["veimod.spawn"]}
execute as @e[type=horse,tag=veimod.spawn] run scoreboard players operation @s veimod.veichles.spawnID = @s veimod.veichles.spawnID
tag @e[type=horse,tag=veimod.spawn] remove veimod.spawn

summon blaze ~ ~ ~ {NoAI:1b,Tags:["veimod.display.spawn"]}
execute as @e[type=blaze,tag=veimod.display.spawn] run scoreboard players operation @s veimod.veichles.spawnID = @s veimod.veichles.spawnID
tag @e[type=blaze,tag=veimod.display.spawn] remove veimod.display.spawn

scoreboard players reset @s veimod.veichles.spawnID

here i am storing the id of each element in a score.

my question is... how can i teleport an entity to another etity with the same id

boreal yarrowBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1736636736:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

shut stump
#

You need to, as one of the entities, store its ID to a fake player, then teleport it to an entity using a predicate in the target selector argument. The predicate should be an entity_scores predicate that checks if the ID score of this is the same as the ID score of the fake player

coarse flower
# shut stump You need to, as one of the entities, store its ID to a fake player, then telepor...

i tried this but it does not work

{
  "condition": "minecraft:entity_scores",
  "entity": "this",
  "scores": {
    "veimod.veichles.spawnID": {
      "min": {
        "type": "minecraft:score",
        "target": {
          "type": "minecraft:fixed",
          "name": ".match"
        },
        "score": "veimod.veichles.spawnID",
        "scale": 1
      },
      "max": {
        "type": "minecraft:score",
        "target": {
          "type": "minecraft:fixed",
          "name": ".match"
        },
        "score": "veimod.veichles.spawnID",
        "scale": 1
      }
    }
  }
}
#

(sorry for the ping)

warped flare
shut stump
#

Ah right might need to be that one

#

They're so similar