entity that alerts a group of other entities

Started by SleepyWhirl on

Topic category: Help with MCreator software

Last seen on 19:59, 10. Dec 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
entity that alerts a group of other entities

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.

Last seen on 20:37, 26. Jul 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can add an 'attack and…
Wed, 09/27/2023 - 15:15

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.