Minecraft 1.16.4 Create imaginary printing plate by command?

Mi
3

I wanted to ask if anyone knows how to program a, I'll call it "imaginary printing plate" by command. By that I mean how to trigger a redstone signal or something when a player enters a certain area…

I have some experience with commands but that would interest me.

Ja

/ execite if entity @a [x = number, y = number, z = number, distance = .number]

With the command you detect whether a player is standing on a block. If you want a player to be recognized in an area and not on a single block then use:

/ execute if entity @a [distance.number]

/ execute if entity @a [distance = number.]

There are two types of this. The first is to find a player within a range of numbers. The second is looking for a player who is outside of a radius.

Mi

Thanks in advance…
That was really helpful!
But I still have one question:

What then happens when a player enters this area?

Does the command block emit a redstone signal?

Ja

Yes he gives. You can intercept the signal with a redstone comparator. Remember to set the command block to repeat.