Hello Everyone! I am working on a youtube video, and I need to duplicate the ability "wrath" on hypixel.
Now, I am going to assume you probably don't know what that is, but let me explain. Basically, within a range of 5 blocks, I want lightning to strike down on every player/mob besides myself when the command block is activated. I am pretty sure this is possible. From what I understand it is something to do with the /execute command. Thank you for your help! (This needs to work for other players though, so if you can add in a scoreboard objective that would enable it to not strike down on the player using it, then that would be good)
Let me explain the command. The execute command allows you to do a command at the location of something besides the player typing it or the command block doing it. It's kind of like as if all the things you target are typing the command in chat. @p is a target selector, which, along with the target selector arguments in the square [] brackets, specifies the person. @p will target the nearest player who fits the criteria of the target selector arguments. @p[name=username] targets the closest person whose name is username. Next in the syntax are coordinates, which tell the game where the player is doing the command. Tildas (~) allow for relative coordinates. By using ~ ~ ~, we are sort of skipping this part, saying from the player, do this 0 blocks x, 0 blocks y, and 0 blocks z, which doesn't move the command. Then we specify the command that will be carried out by the person we selected. In this case, we're using ANOTHER execute command. This targets all entities (@e) with in 5 blocks ( [r=5] ) of the player. So, at the location of the player, we find everything within 5 blocks of the player. Now, we execute at each of those a command which summons a lightning bolt, as if all the players within 5 blocks had suddenly typed /summon LightningBolt] in chat. So, basically, we say that from the person with the name we specify, all the people within 5 blocks summon lightning bolts at their exact position. Hope I helped!
So what it does, is to look for the one, then from there execute one all players on radius of 5 without the score Lightning of 1, and they will summon Lighting at thei feet.
@Webmaster your solution was not practical and you don't have to explain so much for the stuff, people are at least a bit familiar to commands or they could figure parts of it out if without instruction. Try to give shorter explaination next time
Rollback Post to RevisionRollBack
Get any of your command blocks problem solved here:
/execute @e[type=Snowball] ~ ~ ~
/execute @p[r=5] ~ ~ ~ summon LightningBolt ~ ~ ~
-Master_Wilder [Redstone Major]
Check out my Youtube Channel: https://www.youtube.com/channel/UCc2WcZjh4E5MDoP3fETR7rQ
in a command block, (replacing username with the player that does it. For me, it would look like
Let me explain the command. The execute command allows you to do a command at the location of something besides the player typing it or the command block doing it. It's kind of like as if all the things you target are typing the command in chat. @p is a target selector, which, along with the target selector arguments in the square [] brackets, specifies the person. @p will target the nearest player who fits the criteria of the target selector arguments. @p[name=username] targets the closest person whose name is username. Next in the syntax are coordinates, which tell the game where the player is doing the command. Tildas (~) allow for relative coordinates. By using ~ ~ ~, we are sort of skipping this part, saying from the player, do this 0 blocks x, 0 blocks y, and 0 blocks z, which doesn't move the command. Then we specify the command that will be carried out by the person we selected. In this case, we're using ANOTHER execute command. This targets all entities (@e) with in 5 blocks ( [r=5] ) of the player. So, at the location of the player, we find everything within 5 blocks of the player. Now, we execute at each of those a command which summons a lightning bolt, as if all the players within 5 blocks had suddenly typed /summon LightningBolt] in chat. So, basically, we say that from the person with the name we specify, all the people within 5 blocks summon lightning bolts at their exact position. Hope I helped!
have an objective to see who's the one
then /execute @a[score_Lightning_min=1] ~ ~ ~ /execute @a[r=5,score_Lightning=0,score_Lightning_min=0] ~ ~ ~ /summon LightningBolt
So what it does, is to look for the one, then from there execute one all players on radius of 5 without the score Lightning of 1, and they will summon Lighting at thei feet.
@Webmaster your solution was not practical and you don't have to explain so much for the stuff, people are at least a bit familiar to commands or they could figure parts of it out if without instruction. Try to give shorter explaination next time