Enemy should shoot fireballs and lightnings command?

Cl
8

Is it possible to insert an enemy into minecraft that shoots a fireball or lightning every 10 seconds, if both is possible, but the fireball is more important.

And in what and which commande should I then make the commands?

I definitely thank you in advance

gl

Lightning can only strike from top to bottom.

As for fireballs:

With commands, I only know the possibility of spawning a skeleton that shoots arrows, leaving the lava traces and causing the enemy to burn.

Do you want to know more?

Cl

Yes please and that with the lightning coming from above I meant it

gl

You write in two command blocks (Repeat | Absolutely | Always active):

/ execute positioned as @e [type = arrow] run setblock ~ ~ 1 ~ lava [level = 15]

This command ensures the lava track of all arrows. It is not typed ~ ~ ~ because otherwise the one who shoots the arrow burns too, which would be pretty nasty.

In the second command block:

/ kill @e [type = arrow, nbt = {inGround: 1b}]

Kill all arrows on the floor or on the wall

When and where should the lightning strike?

gl

So the arrows are killed so that there's no infinite lava over the arrow.

And by the way, very important:

You have to write "keep" after the first command in my comment!

Cl

In the direction of the player but so that the player can still dodge

Cl

Okay, thank you, I'll give it a try

gl

Lightning can only be spawned in one direction, straight down. You can make it so that when the arrow hits the ground or a player, lightning strikes at that position. By the way, you can't avoid lightning. You can't slow them down either. It strikes just as quickly as lightning in reality.

Cl

Ok, yes that would be ok too