COG Flag - AI Mode

AI Mode Flags Table

Hex Purpose
0x1Actor is moving towards its destination.
0x2Actor is trying to attack its target.
0x4Actor is searching for targets or danger.
0x8Actor is turning to face its look destination.
0x10Actor's current move destination is valid.
0x20Actor's current fire target is valid.
0x40Unknown.
0x80Unknown.
0x100Unknown.
0x200Actor is awake and active.
[[#0x400|0x400]]Actor has its target in attack range or sight.
0x800Actor is fleeing. This flag cannot be set manually.
[[#0x1000|0x1000]]Actor will not attack.
0x2000Actor's AI is disabled.

AI Mode Flags Description

An actor's AI Mode Flags show what the actor's AI is doing. Each of these flags describes an action that the AI is performing or a condition that was met. Mode flags can be used to give actors commands. For example, setting the 0x4 mode flag would cause the actor to look for targets. Setting the 0x1 mode flag would make the actor move to his current destination. Clearing the 0x1 flag would stop him from going to his destination.

AI Mode Flags can contradict each other. Setting the 0x4 mode flag while the actor is attacking a target is useless. You may need to set or clear certain flags to make the AI do what you want.

Verbs Used: AIClearMode AIGetMode AISetMode

0x400

The 0x400 mode flag is assigned to an actor when its target is in range. However, the flag is not cleared until the target moves out of sight.

0x1000

This flag is assigned to all actors in a level if they're not in view of the player. It is cleared when the player first sights the actor or when the actor senses the player.

  • Create:
This page was last modified 21:50, 27 March 2006.   This page has been accessed 311 times.