2

I made a map and I'm trying to make something like this:

I need a command that will run when anyone enters certain area/coordinates, it will display colored text. I tried every command that I guessed it will work.(/execute -/tellraw -/testfor) But it didn't work. This is another example of what I tried: **\tellraw** command (*Colored Text*)

An example of what I'm trying to do:

If anybody enters 10 60 10 to 50 60 10 coordinates, a red colored text will say: "You're about to fall down!"

What is a functioning command

4
  • What is the actual command you tried? Commented Jul 19, 2017 at 15:47
  • Are you sure the range is from height 60 to height 60? That would mean that players who jump would be excluded. Commented Jul 19, 2017 at 15:48
  • Should it happen every time the enter or just once? Commented Jul 19, 2017 at 15:50
  • May not be possible without a large number of command blocks, will a radius work instead?
    – RS_Mind
    Commented Jul 23, 2017 at 5:49

1 Answer 1

1

I might know! You have to do radius though, here is the command:

/execute @a[x=-30,y=60,z=10,r=2] ~ ~ ~ tellraw @p ["",{"text":"You're about to fall down!","color":"dark_red"}]

EDIT: You have to put it in a command block that is Repeat Unconditional and Always Active, you can put it anywhere.

2
  • FYI you should not be using /execute like that. Only use /execute when the origin or executor needs to be changed, which is not the case here. Just move the selector from /execute into /tellraw. Also be aware that this just spams the player's chat rather than plays a single time when they enter the area.
    – Skylinerw
    Commented Jul 23, 2017 at 22:26
  • You're right but he can make something that prevents it from spamming.
    – IceBotYT
    Commented Jul 26, 2017 at 22:10

You must log in to answer this question.

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