3
OK what is up with Command Blocks in Bedrock
I'm new to command blocks but I have found that the tutorials online do not work for the Bedrock edition. Even command generator websites where you can make a command book do not work. So what's the deal?
Also what I just really want to do is make a title appear every time someone enters a town. I have the testfor @p[r=5] and another block that tells it to write the title. And it works... once and then never again. How do I make it work every time someone enters the town? How do I make the command block reset?
Also what I just really want to do is make a title appear every time someone enters a town. I have the testfor @p[r=5] and another block that tells it to write the title. And it works... once and then never again. How do I make it work every time someone enters the town? How do I make the command block reset?
Create an account or sign in to comment.
7
1
Ok. So, what you could do is have a pressure plate attached to the title command block, and have that pressure plate on the threshold of your town. If you need any more help with commands, just let me know.
1
To make command blocks work every time someone enters a town, you either have to make multiple command blocks of the same type, and have each of them say an individual Player name instead of @p, or maybe set it to a repeating command block. Sure, the last one will spam the chat, but infinity is better than one!
1
Bedrock hasn't updated to Java's newer version of command blocking as of right now. It also has quite a few commands missing e.g. '/data' and lots of other features also missing that have been in Java for a few years now.
As for your question with '/testfor', that is nothing to do with Java and Bedrock parity, the command is saying it will activate when at least 1 player is in the 5 block vicinity, then won't activate again pretty much due to a glitch with @p and using the r parameter (I think I used the wrong word there but you get the point.) If you change it so it says @a[r=5] it will activate once when a player comes in a 5 block radius, resets when that player leaves the radius, then reactivates when another player enters the radius. You would also need to set the @p on the other block to @a[r=5] because then if two players enter the radius at the same time only one will get the title. I'd also recommend making the radius smaller as if one player enters the radius, then another player enters the radius before the other one leaves, the second player won't get the title, but that is up to you...
As for your question with '/testfor', that is nothing to do with Java and Bedrock parity, the command is saying it will activate when at least 1 player is in the 5 block vicinity, then won't activate again pretty much due to a glitch with @p and using the r parameter (I think I used the wrong word there but you get the point.) If you change it so it says @a[r=5] it will activate once when a player comes in a 5 block radius, resets when that player leaves the radius, then reactivates when another player enters the radius. You would also need to set the @p on the other block to @a[r=5] because then if two players enter the radius at the same time only one will get the title. I'd also recommend making the radius smaller as if one player enters the radius, then another player enters the radius before the other one leaves, the second player won't get the title, but that is up to you...
1
I don’t believe, “@a” exists. There is an @e, which targets all entities who get in a five block radius, including animals and items, so I don’t believe that would work.
4
@a is all players...
1
Ohhhhhhhhhhh
1
The devs with Bedrock never really bothered to add command block functionality to Bedrock unlike Java. Thats why its has a really bad command blocking system and why all the good command blockers are in Java.