Started by
Antonyan000
on
Topic category: Help with modding (Java Edition)
I'm working on a ranged item that when throws the projectile, it spawns an entity which I would like to give the features that I've mentioned in the title.
My idea is basically that the player can kill the entity by the normal way, with a sword, bow, or any weapon, but if it dies from a lighting, it ''reflects'' the lightning to the other mobs
except of you (player).
Make a procedure that triggers when the entity dies, that runs an entity iterator bracket. (This is found in the world tab, and essentially targets every entity in a radius.) Inside the bracket, use an if-bracket to check if the entity iterator is a living entity, and is not a subtype of player. Inside the if bracket, use the 'strike lightning' function to summon lightning at the x/y/z position of the entity iterator. (Again, this will run for every entity in the radius that meets the conditions you provide.)