Friend or Foe? Problems with the Generic Team ID
Author: Luis Lugo
Posted on 03/14/2025
During the development phase of the AI agents, I encounter the problem that if I spawn 2 or more "enemies" into the scene they would just look at each other and follow each other around, mostly ignoring the player. This is obviously something we want to avoid moving forward because it definitely is game breaking and the player would no doubt be frustrated trying to engage with the game and the game behaving completely erratic.
My teammates pointed out that our AIController was in fact missing the Generic Team Id logic that takes care of handling how the AI behaves towards other actors in the world depending on their Team Id. I attempted to resolve the issue in the controller by getting the team id from the actors perceived by the Sight_Config component and handling the attitude towards them based on if the Id matches the same as the controller's pawn, it is friendly, if the controller matches the Id given to the player (let's say 1), it is hostile, and if does now match either then it is neutral. As of now I am still coming up with a solution since I've hit a wall trying to set the Team Id on the Agents and Player's classes.
Relic of the Hollow King
Status | In development |
Author | Indifferent Kitchen Std. |
Genre | Action |
More posts
- Experience systems and bug extermination.6 days ago
- Implementing the Dialogue System25 days ago
- What it's like when a player won't look where you want him to.31 days ago
- Too Much or Too Little? Lighting32 days ago
- Implementing Audio & Video Settings32 days ago
- The Fight Between Movement and Magic38 days ago
- Material and Sound Challenges38 days ago
- Sword & Shield38 days ago
- Implementing the UI38 days ago
Leave a comment
Log in with itch.io to leave a comment.