Hi, I was making a PvP map and I thought: is there a way I which I can summon a Zombie with the nearest person head, so it can see how would it look like while fighting, I have everything with the kits except that, so I would appreciate if you could help me with this.
The r=20 is the area of blocks it will summon the zombie in. You can change that as needed.
The @p part summons the zombie at the nearest player to the command block within the 20-block radius.
Onto the more complicated part.
To make it a custom head.
You need to know the players name who will be playing the map.
Put their name where <PLAYERS NAME GOES HERE IS>
/summon Zombie ~ ~1 ~ {Equipment:[{},{},{},{},{id:skull,Damage:3,Count:1,tag:{SkullOwner:<PLAYERS NAME GOES HERE>}}]}
Finally, add that part to the /execute @p[r=20] ~ ~ ~ Zombie
It should look like this- /execute @p[r=20] ~ ~ ~ summon Zombie ~ ~ ~ {Equipment:[{},{},{},{},{id:skull,Damage:3,Count:1,tag:{SkullOwner:<PLAYERS NAME GOES HERE>}}]}
Finally, add that part to the /execute @p[r=20] ~ ~ ~ Zombie
It should look like this- /execute @p[r=20] ~ ~ ~ summon Zombie ~ ~ ~ {Equipment:[{},{},{},{},{id:skull,Damage:3,Count:1,tag:{SkullOwner:}}]}
Hope this helps!
While this works for known players, it cannot be done with a unknown players ("nearest player") because target selectors are not parsed for "SkullOwner" or related.
The only way to get it to work is to have a command block for every single Minecraft account in existence (not feasible, of course), which still doesn't take into consideration new accounts.
Hi, I was making a PvP map and I thought: is there a way I which I can summon a Zombie with the nearest person head, so it can see how would it look like while fighting, I have everything with the kits except that, so I would appreciate if you could help me with this.
You cannot currently (1.8.3) do this.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
I don't know if this will work, but try
/execute @p[r=20] ~ ~ ~ summon Zombie
The r=20 is the area of blocks it will summon the zombie in. You can change that as needed.
The @p part summons the zombie at the nearest player to the command block within the 20-block radius.
Onto the more complicated part.
To make it a custom head.
You need to know the players name who will be playing the map.
Put their name where <PLAYERS NAME GOES HERE IS>
/summon Zombie ~ ~1 ~ {Equipment:[{},{},{},{},{id:skull,Damage:3,Count:1,tag:{SkullOwner:<PLAYERS NAME GOES HERE>}}]}
Finally, add that part to the /execute @p[r=20] ~ ~ ~ Zombie
It should look like this- /execute @p[r=20] ~ ~ ~ summon Zombie ~ ~ ~ {Equipment:[{},{},{},{},{id:skull,Damage:3,Count:1,tag:{SkullOwner:<PLAYERS NAME GOES HERE>}}]}
Hope this helps!
While this works for known players, it cannot be done with a unknown players ("nearest player") because target selectors are not parsed for "SkullOwner" or related.
The only way to get it to work is to have a command block for every single Minecraft account in existence (not feasible, of course), which still doesn't take into consideration new accounts.
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
I know. How unfortunate.
*sigh...*