1

Make text appear every time a requirement is met?

Denisowator 4/18/16 2:47 pm
680
4/18/2016 11:01 pm
I've been struggling to do this for the longest time!

Let's say there's a blocked off area, and I want text to appear every time someone walks up to it. How do I do that?

I don't want it to appear only once, and I don't want it to spam the chat once a player walks up to that blocked off area.

Someone please help.
Posted by
Denisowator
Level 25 : Expert Warrior
12

  Have something to say?

JoinSign in

11

Sparthia
04/18/2016 10:27 pm
Level 20 : Expert Network
I suggest you look into Skript, you can literally code anything you want in Minecraft using simple English.
1
AncientRealms
04/18/2016 11:01 pm
Level 1 : New Network
Ofcourse it may take time to learn, But he pretty much hit the nail on the head and it can do most things that java could do in bukkit coding.
1
tobbestark
04/18/2016 4:09 pm
Level 45 : Master Architect
In 1.9 you can set command blocks to repeat themselves, right? Cause the /testfor command only works once so you need to have a circuit to power it over and over again. But I think you can set the command block to power it self over and over without a circuit. However you need to pass in the following command /testfor @p[r="x"] where "x" is the selected radius away from the command block. Then you can use the /title command to make a JSON based text. If you type /title @p title {"text":"Access prohibited","color":"dark_red"} you'll make a text in the middle of the screen saying "Access prohibited" in red. And if you put that command block infront of the other one in 1.9 the string will be prompted when a player goes inside the "x" radius. If you didn't get it or need some help, use the Minecraft Wiki
1
Denisowator
04/18/2016 4:24 pm
Level 25 : Expert Warrior
That wouldn't work, since the repeater command block would be executing that command every tick. So if you walked into the area, it would spam the text until you came out of it.
1
Jmal116
04/18/2016 4:32 pm
Level 34 : Artisan System
If you use comparators and a testfor it should only run the title command once. The testfor would run every tick, but the player wouldn't ever see that. When the player enters the testfor turns on and shows the text, the comparator then gets locked on until they leave. When they do, the comparator turns off and is ready to be used again.

If you really are having trouble setting it up you could always put a tag or scoreboard on players who enter the area and then remove it when they leave, but in this case just using the testfor is much easier.
1
Denisowator
04/18/2016 4:52 pm
Level 25 : Expert Warrior
Oh right. For whatever reason I was thinking he meant without the comparator. xD
1
Denisowator
04/18/2016 3:38 pm
Level 25 : Expert Warrior
Sorry Karrthus for my somewhat mean comment. I saw that you're level 51 so I guessed you must know what you're talking about. I tried looking at your automated piston door, as it follows the same detection system.

The problem was my setup. Apparently when you have a repeater in front of a comparator, and you have a command block right in front of that repeater, the comparator stays active after the command block finds the player.

Basically I'm using a setup, that I found on the internet somewhere, that has a checking command block, going to a /tellraw command block, which sends a signal that stops a clock.

I should thank you, since if you didn't reply I would never check your profile and never would've found the solution. xD

So thanks.
1
Karrfis
04/18/2016 2:59 pm
They/Them • Level 35 : Artisan uwu uwu
with vanilla you cna use the detect player command (/testfor @p)

then detect for stuff like rotation of the player n stoofs depending if you only want them to see it coming in one way (idk how to do them, i jsut know they exist)
1
Denisowator
04/18/2016 3:16 pm
Level 25 : Expert Warrior
Doesn't fix my problem. I want to know how to make the command reset itself somehow, so that it is triggered when someone walks to the area, and when they walk out it resets so it will be triggered the next time they walk up.

Also, I did say it's a blocked off area. So basically what I'm getting from your reply is either you had two tabs open with similar questions, and you posted the reply on the wrong one, or you were VERY tired when you replied.
1
Azrath
04/18/2016 2:54 pm
Level 27 : Expert Button Pusher
Server with plugin or pluginless?
1
Denisowator
04/18/2016 3:17 pm
Level 25 : Expert Warrior
It's a singleplayer adventure map. Sorry I should've said that.
1

Welcome