Started by
SleepyWhirl
on
Topic category: Help with MCreator software
hello
im trying to make an entity that alerts all entities of a specific type in a radius around it self of the player so that they all set their attack target to the player
its a bit confusing to figure out correctly so i wanted to ask if anybody would have a method of doing this?
thanks.
You can add an 'attack and call for help' function to the entity's AI that will give it the zombie/zombie piglin behavior. (Attacking one causes all nearby entities of the same type to help the victim), or you could hard code a procude that triggers when the entity's attacked, searching for entities of a type with an entity iterator, and setting their attack targets to the attacker. (There's a function in the latest version of MCcreator to set attack targets, and it's quite useful.