Jump to content
  • 0

[API] ShipAI - a way to check if entity/faction registered as an enemy/friend


Rinart73

Suggestion

Example: We have an enemy faction or entity. We register it as friend:

 

ShipAI():registerFriendFaction(faction.index)
ShipAI():registerFriendEntity(other.index)

 

Then we want to check if this faction/entity was registered as a friend. And.. we can't. We can only check if there are enemies in the sector or try to get nearest enemy.

 

So, please add a way to check this for both enemy and friend registration.

local bool = ShipAI():registeredFriendFaction(factionIndex)
local bool = ShipAI():registeredEnemyFaction(factionIndex)
local bool = ShipAI():registeredFriendEntity(entityIndex)
local bool = ShipAI():registeredEnemyEntity(entityIndex)

Link to comment
Share on other sites

0 answers to this suggestion

Recommended Posts

There have been no answers to this suggestion yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...