1

I was just wondering if I can use tilde's in setting a scoreboard count or something. Ideally what I want to do is that the location of an entity to three objectives, the X, Y, and Z, so that I can run a fill command. Thanks

1
  • Hello TameHog and welcome to Arqade. Pretty good first questions, but I fear we're going to need more information. In particular, I don't know how you will link the x y z objectives to your /fill command. What is it exactly you are trying to achieve? Do you want to execute /fill with coordinates relative to an entity? If so, did you have a look at the /execute command?
    – MrLemon
    Nov 29, 2014 at 8:17

1 Answer 1

0

There is no easy way to set a scoreboard objective to X Y Z using tildes or JSon or anything like that.

One possible way to do it would be to summon a "tracker" entity at 0,0,0, have it detect (using dz dy dz) which direction the entity to locate is from this tracker entity, teleport the tracker one block in that direction, increment/decrement X, Y, or Z, then repeat until the entities are on top of eachother.

I would explain that method in more detail, but even once you have the coordinates in a scoreboard objective there's not really anything you can do with them, there's no way to use them in a /fill command.


What I would recommend instead is using /execute and then tildes straight into the /fill command. For example, to fill a region from 10,10,10 to the entity's location, you could run:

/execute @e[name=FillEntity] ~ ~ ~ /fill ~ ~ ~ 10 10 10 stone

I'd need more information about what you're actually trying to do though. If you're wanting to fill an area between two dynamic points (rather than a dynamic and a static) then it'd be hundreds of times harder.

0

Not the answer you're looking for? Browse other questions tagged .