Elementium Sign in
Contents

Entities & mobs · Value

Distance between entities

How far apart two entities (or an entity and a player) are, in blocks. They must be in the same world.

Basic plan m.entity.distance_to

In a flow

“When a player uses a command → Distance between entities → Answer: {node.d.distance} blocks.”

When a player uses a command → Distance between entities → Answer: {node.d.distance} blocks.

What it does

How far apart two entities (or an entity and a player) are, in blocks. They must be in the same world. It's a value node: no white pins, it works out its answer when a step wired to it needs it. It gives 1 value later steps can use. Find it under Entities & mobs in the palette.

When to use it

Use it when the flow needs to: how far apart two entities (or an entity and a player) are, in blocks. They must be in the same world.

When not to

For a value that never changes, type it into the setting instead of wiring a node.

Typical wiring

Sockets: settings you can wire

Entity Entity

The first one.

What goes there: Type it in the side panel, or wire in an entity. e.g. Zombie

If it's empty: Optional. Left empty and unwired, the step runs without it.

To Entity

The other one: an entity or a player.

What goes there: Type it in the side panel, or wire in an entity. e.g. Zombie

If it's empty: Optional. Left empty and unwired, the step runs without it.

Values it gives

Distance Number

How far apart they are, in blocks. e.g. 7.5

If it's empty: Empty when the step didn't make one (it stopped early or was skipped); steps reading it get nothing.

Connects toAccount ageActive membersAddAdd answer to formAdd soundboard soundAdd timeAdd to a counterAdd to a leaderboardand 719 more

Often next

Related in Entities & mobs

Wires and sockets · Data values · Plans