Hello everyone,
I'm trying to create a custom AI for an instanced event that involves two opposing teams of mobs, but I'm struggling with the logic and could use some guidance.
The Goal:
I want to create two opposing factions of mobs (let's call them Team A and Team B). The desired behavior for their AI is as follows:
Mob vs. Mob Aggro: Mobs from Team A should automatically attack mobs from Team B when they are in range, and vice-versa. They should see each other as enemies.
Player Priority Targeting: If a mob from Team A sees a player from the enemy team, it should prioritize attacking the player over any enemy mobs in the area.
Return to Mob Combat: After the enemy player is killed or leaves their aggro range, the mob should resume fighting against the enemy mobs (Team B).
The Problem:
I am having trouble figuring out the best way to implement this logic. I'm not sure how to make mobs recognize other mobs as valid targets based on a faction or team, and how to create a targeting priority that prefers enemy players over enemy mobs. There are forum posts that discuss making mobs fight each other, but the specifics of implementing it are unclear.
Is there a way to manage the AI's target priority list to always focus on players first?,
Any code snippets, links to relevant guides, or even just logical pseudo-code would be incredibly helpful.
I'm trying to create a custom AI for an instanced event that involves two opposing teams of mobs, but I'm struggling with the logic and could use some guidance.
The Goal:
I want to create two opposing factions of mobs (let's call them Team A and Team B). The desired behavior for their AI is as follows:
Mob vs. Mob Aggro: Mobs from Team A should automatically attack mobs from Team B when they are in range, and vice-versa. They should see each other as enemies.
Player Priority Targeting: If a mob from Team A sees a player from the enemy team, it should prioritize attacking the player over any enemy mobs in the area.
Return to Mob Combat: After the enemy player is killed or leaves their aggro range, the mob should resume fighting against the enemy mobs (Team B).
The Problem:
I am having trouble figuring out the best way to implement this logic. I'm not sure how to make mobs recognize other mobs as valid targets based on a faction or team, and how to create a targeting priority that prefers enemy players over enemy mobs. There are forum posts that discuss making mobs fight each other, but the specifics of implementing it are unclear.
Is there a way to manage the AI's target priority list to always focus on players first?,
Any code snippets, links to relevant guides, or even just logical pseudo-code would be incredibly helpful.
Last edited:
