briefly told you how to make that work:
1) summon armor stand (more armor stand = more anvils in tick)
2) execute players around, spreadplayer the armorstand in certain distance relatively to player coord.
3) summon falling block which lock the type of block as anvil. (or be easier, execute armor stand postition then setblock.)
Let's go into a bit more detail shall we?
You could make a datapack with a few simple functions. all of the commands (except for the function ones) will still work without a datapack, but I'd recommend one since you want the anvils to drop every few seconds or so.
One function that starts the game:
#repeat the following command depending on how many anvils you want per player per drop.
execute as @a at @s run summon armor_stand ~ ~ ~ {Invisible:1b,NoGravity:1b,CustomName:'{"text":"Anvil"}'}
#then run the function that'll drop the anvils
function anvil:drop
The function "anvil:drop" should look like this:
#we spread the armorstands around the players
execute as @a at @s run spreadplayers ~ ~ <spreadDistance> <maxRange> false @e[type=armor_stand,name=Anvil,limit=<count you spawn per player>,sort=nearest]
#we teleport the armorstands up 50 blocks (you can change the height if you want) so their hitboxes don't interfere with the players.
execute as @e[type=armor_stand,name=Anvil] at @s run tp @s ~ ~50 ~
#we place anvils at the location of all the armorstands we spawned.
execute as @e[type=armor_stand,name=Anvil] at @s run setblock ~ ~ ~ anvil
#and we repeat the function in 10 seconds (again, you can change the amount if you like.) IF the armorstands we spawned still exist (so you can actually stop the loop by removing all the armorstands.)
execute if entity @e[type=armor_stand,name=Anvil] run schedule function anvil:drop 10s
To end the game, you can simply run the command (or make another function for it):
I saw few diffrent videos from Slogoman where he tries to survive while blocks are falling on him.
I tried to look on google how to do it but there is not much. Can someone explain it?? Here's an example
of video
briefly told you how to make that work:
1) summon armor stand (more armor stand = more anvils in tick)
2) execute players around, spreadplayer the armorstand in certain distance relatively to player coord.
3) summon falling block which lock the type of block as anvil. (or be easier, execute armor stand postition then setblock.)
Let's go into a bit more detail shall we?
You could make a datapack with a few simple functions. all of the commands (except for the function ones) will still work without a datapack, but I'd recommend one since you want the anvils to drop every few seconds or so.
One function that starts the game:
The function "anvil:drop" should look like this:
To end the game, you can simply run the command (or make another function for it):
Have fun playing!