How do I invoke many thunderbolts in a certain region? [duplicate]
In Minecraft 1.12, I'm trying to get a certain region to be hit by constant thunder. I was trying to use this command:
/summon minecraft:lightning_bolt 494 33 598 [dx=5,dy=5,dz=5]
but it just hits a single block and that's not what I want. Is there a way to do what I want?
Solution 1:
Here is how I would achieve this effect. There is a command called /spreadplayers which teleports the specified entity or more entities to a random block within a specified range. Keep in mind that the command teleports the armor stand to the top-most block of the randomly selected spot.
simply summon an armor stand in the center of the area where you want the lightning to strike: /summon minecraft:armor_stand ~ ~ ~ {Tags:["c"],Invulnerable:1,Invisible:1}
and summon one more armor stand to act as the lightning point:
/summon minecraft:armor_stand ~ ~ ~ {Tags:["lp"],Invulnerable:1,Invisible:1}
and then you will need a repeating command block (set to always active) running this command:/execute @e[tag=c] ~ ~ ~ spreadplayers ~ ~ 10 11 false @e[tag=lp]
the first number is the desired spread distance and the second one is max distance.
once you activate this command block, you should see the armor stand flying all over the place. Now attach a chain command block to the repeating command block (also set to always active) and paste this in: /execute @e[tag=lp] ~ ~ ~ summon minecraft:lightning_bolt ~ ~ ~
tested on 1.12.2, this is what your command block layout should look like: