Make certain IObjects hostile to bots
Posted: Wed Feb 26, 2020 12:52 pm
Currently bots only attack other players and streetsweepers that are not in the same teams, all other objects are neutral. I am making an auto turret that will be belonged to a certain team, bots will not attack it because it's just a combination of other objects that normally deems no threat to them. So it would be nice to have some sort of APIs to make the bots aware that they are a threat like the streetsweepers. Something like:
Code: Select all
IObject doorComponent = // Create game object
doorComponent.BelongsTo = Owner.Team1;
// Indicate that this is just a passive object that belongs to other teams.
// Bots don't have to actively hunt down it, should not waste ammo on it,
// but will destroy it when it's convenient to them
doorComponent.ThreatLevel = ThreatLevel.Low;
IObject turretComponent = // Create game object
turretComponent.BelongsTo = Owner.Team1;
// Indicate that this is an object that may deal damages to other players.
// Bots will actively hunt down it and treat it like other players and streetsweepers
turretComponent.ThreatLevel = ThreatLevel.High;
public enum Owner
{
Team1,
Team2,
Team3,
Team4,
Independent,
None,
}