agent_get_combat_state information

Users who are viewing this thread

Jinnai

Sergeant at Arms
So there's this little function in the Module System known as agent_get_combat_state and it's not documented in any way.  In fact it's only used once in the entire thing that I've found, and that's in sieges to reportedly determine if a ranged unit can see a target or not.

I've been wanting to do things in the mod I'm working on to make agents a little smarter.  So I started exploring this function.  And here's what I've discovered:

For the player or dead units it always returns 0.
But for living human agents here are some of the values it can return and what each seems to mean:
0 = nothing active
1 = firing ranged
3 = preparing and holding attack (either melee or ranged)
4 = swinging with melee
7 = recovering from being hit
8 = ranged equipped, no target in field of view

The agent actively blocking doesn't seem to change this value, nor does mounting or dismounting.

I can't seem to get any other returns than these.  Has anyone else explored this function?  Does anyone out there know anything about this function at all and would like to contribute to this? 
 
Jinnai said:
So there's this little function in the Module System known as agent_get_combat_state and it's not documented in any way.  In fact it's only used once in the entire thing that I've found, and that's in sieges to reportedly determine if a ranged unit can see a target or not.

I've been wanting to do things in the mod I'm working on to make agents a little smarter.  So I started exploring this function.  And here's what I've discovered:

For the player or dead units it always returns 0.
But for living human agents here are some of the values it can return and what each seems to mean:
0 = nothing active
1 = firing ranged
3 = preparing and holding attack (either melee or ranged)
4 = swinging with melee
7 = recovering from being hit
8 = ranged equipped, no target in field of view

The agent actively blocking doesn't seem to change this value, nor does mounting or dismounting.

I can't seem to get any other returns than these.  Has anyone else explored this function?  Does anyone out there know anything about this function at all and would like to contribute to this?

Thanks for this, mate.
 
Back
Top Bottom