string& GetEnemyStateName(string &in asName);
Returns the name of the state a specified enemy is current in.
asName - Internal name of the enemy
Ever since this was added to the game with the 1.3 update, it has always confused me and I felt the description of it didn't really make things clear me but today I found what you could do with it. I'm surprised no-one brought it up.
Here are the states I have discovered that an enemy can be in so far.
You can use the GetEnemyStateName function the same way as any other Get function. Example:
if(GetEnemyStateName("Enemy") == "Hunt")
{
/////insert fancy code here////////////
}
if(GetEnemyStateName("Enemy") == "Investigate")
{
AlertEnemyOfPlayerPresence("Enemy");
}
Hopefully, this would allow people to mess around with enemies more and have some interesting encounters.
I'm surprised no-one has talked about this. I would really like to hear people's ideas about this and see what cool stuff they come up with.