1

Command block tutorials?

Hronznate's Avatar Hronznate7/13/14 7:31 pm
1 emeralds 253 2
7/13/2014 8:16 pm
TheRedSkorpion's Avatar TheRedSkorpion
I need help with Command Blocks

-a common area I get is "player not found" even when I use @p or @a
-I would like to link command blocks to command blocks. Like if this command block is activated then that command block is activated
-Is it possible to make an area for survival only and not the whole world? Like you walk into a certain radius of a command block then another one with switch you to a gamemode?
-Is it also possible to make a gamerule for a certain area and not the entire world?

Videos would be appreciated
And if you explain please be as detailed as possible

Thank you for your help
Posted by Hronznate's Avatar
Hronznate
Level 1 : New Miner
0

Create an account or sign in to comment.

2

1
07/13/2014 8:16 pm
Level 20 : Expert Engineer
TheRedSkorpion
TheRedSkorpion's Avatar
Hi Hronznate, I'll try to answer each of your question separatly. First you should check this wiki to better understand what I'll explain (i.e. if you don't understand a specific word).

1-you can use a selector in 2 general way. Fist it's directly a command f.e.
/gamemode <mode> [player]
/gamemode 1 @p

or you can use it, like mrelectroman3 suggested, to display the name of one or multiple player in text f.e.
/say <message …>
/say @p is the best

In this last example, @p will display as the name of the closest player of the one that runs the command (so himself) or of the command block that runs the command.

All of that just to say that tp answer correctly your question, I need you to tell me what it is, else I can't really help. (if you use your selector directly in your command as I said in my first example, it might be an argument problem).

2-there are tons of way you can do that. f.e. you can use the testfor command to detect certain datatag on the @p/@a/@r/@e. If the information that you want is part of a datatag or can be checked with a selector argument, this is the command you want. You just need to put a comparator pointing outward of your first command block, like so:

(Right click -> Open image in a new window if it's too small)
Note that you need to run your first command block on a clock and if your testfor get the output true, the redstone will stay on until it becomes false.

You need to know that there are other command that can output redstone signal via comparators, and they all have a different way. The majority will output a signal if they command executed correctly, like /clear. (if you specify a type of block to remove from the inventory and the player doesn't have it, the command will fail, so the output will be false (no redstone signal))

If you want to use other command then the ones I mentionned and you don't know how to use them with comparators, just ask

3- Yes, totaly possible. You also don't need the ccommand block to be centered. Of course you want to use the command
/gamemode <mode> [player]
Let's make an example: you have a circular zone of radius 25, centered on a block. The coordinate of the middle block are x:-65, y:130, z:75. You want everyone that enter this circle to be in survival (Let's say you want to cycle between creative and survival). This is the command that you should run on a clock:
/gamemode 0 @a[x=-65,y=130,z=75,r=25,m=1]
the x, y, z and r check the zone of search and the m=1 means only player in creative. In other word, your command block will put everyone (that are in the zone and that are in creative only) in survival mode.

4-No it's not. gmarule are made for all the world.

If you want any more info or clarification, just p.m. me :p
1
07/13/2014 7:34 pm
Level 18 : Journeyman Network
xmx1024
xmx1024's Avatar
Make sure you have spaces between your @p and other text

ex.

broadcast @p is cool!
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome