#Mobs that switch between targets

1 messages · Page 1 of 1 (latest)

subtle sandal
#

Would it be possible to make it so that custom mobs (example zombies) would target something far across the map, but attack close by players? And then go back to the behavior of targeting that main target.

Basically I'm trying to create this sorta tower defense/pve minigame where zombies (or other mobs) would try to take down a villager but they would also attack players when triggered.

half boltBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1725962416:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

#
⚠️ You already have a question open!

Don't forget to close or resolve your old questions once you're done with them. It makes our lives much easier! :D

Open question: #1279610747327877140

#
⚠️ You already have a question open!

Don't forget to close or resolve your old questions once you're done with them. It makes our lives much easier! :D

Open question: #1279047330833895465

hardy ridge
subtle sandal
#

Main problem is that they need to target a certain entity unless a player comes near or something

hardy ridge
subtle sandal
hardy ridge
#

you can check from the position of the gun towards the villager to see if there are any blocks on the way, then aim the gun and shoot

subtle sandal
#

Just mobs

hardy ridge
subtle sandal
#

Basically like, mobs spawn and players fight them so they dont reach their goal

#

Imagine mann vs machine from tf2 sort of

#

But instead of the bomb its just mobs dealing damage to the villager

#

So the mobs will target players as normal but if there is no players around they would start going for the villager

#

Alternatively I could have mobs that target ONLY the villager and mobs that target only players

#

But I'd like the first option more if its possible in any way

subtle sandal
#

so not possible?

#

or

#

is it possible to make it so they prioritise villagers over players

vital bobcat
#

It's possible but not simple

#

As Antoha said, it does require essentially making your own AI system with a series of scoreboards, tags, and teleports or data commands

hardy ridge
subtle sandal
#

lets just say I want to spawn a single zombie and want it to target the villager instead of the player

#

they always prioritise players

#

oh wait I could use teams for thos

#

alright, if I make a zombie that has the same team as the player they wont attack players and focus solely on the villager, this is rgeat

#

however would there be a way to make it so that they attack players at a close range?

subtle sandal
#

is it possible to make it so that mobs don't get angry at skeletons after they shoot them by accident?

safe pebble
#

I know for a fact that you can set the target of any neutral mob, but I'm not sure about zombies :/