GetAILevel(object)

Retrieves the current AI (artificial intelligence) level that a creature is running at.

int GetAILevel(
    object oTarget = OBJECT_SELF
);

Parameters

oTarget

Creature to check the AI level of. (Default: OBJECT_SELF)


Description

Returns the current AI_LEVEL_* value that a creature is running at. Different AI levels indicate how smart a creature acts and how much CPU time and priority it receives. Creatures that are standing by doing nothing generally have AI_LEVEL_LOW, but when a creature enters combat it will have AI_LEVEL_NORMAL by default.



Remarks

Too many creatures with AI_LEVEL_NORMAL will tax the processor and performance degradation will occur.


Version

1.30

See Also

functions: SetAILevel
categories: Core AI Functions
constants: AI_LEVEL_* Constants


 author: Charles Feduke
 Send comments on this topic.