The SetAILevel() NWScript command sets the "intensity" at which the AI of an creature should be operating. This does not work on player characters, nor on objects that are not creatures. Normally this command is not needed, as creatures will by default adjust their AI level in response to their circumstances (lower AI when no player characters are in the area, and higher AI when in combat). Its main use is for when the default adjustments are inadequate for some reason. If the AI level is changed from the default, it will remain at the specified level (the game no longer adjusts it due to circumstances) until it is explicitly returned to the default (using AI_LEVEL_DEFAULT).
Attributes | Values |
---|
rdfs:label
| |
rdfs:comment
| - The SetAILevel() NWScript command sets the "intensity" at which the AI of an creature should be operating. This does not work on player characters, nor on objects that are not creatures. Normally this command is not needed, as creatures will by default adjust their AI level in response to their circumstances (lower AI when no player characters are in the area, and higher AI when in combat). Its main use is for when the default adjustments are inadequate for some reason. If the AI level is changed from the default, it will remain at the specified level (the game no longer adjusts it due to circumstances) until it is explicitly returned to the default (using AI_LEVEL_DEFAULT).
- function SetAILevel (object oTarget, int nAILevel) Sets the current AI Level of the creature to the value specified. Does not work on Players. The game by default will choose an appropriate AI level for creatures based on the circumstances that the creature is in. Explicitly setting an AI level will over ride the game AI settings. The new setting will last until SetAILevel is called again with the argument AI_LEVEL_DEFAULT.
|
dcterms:subject
| |
dbkwik:nwn2/proper...iPageUsesTemplate
| |
returns
| |
Name
| |
param
| - object oTarget
- int nAILevel
|
param2desc
| - An AI_LEVEL_* constant indicating the new AI level.
|
param1desc
| - The object whose AI level is to be returned.
|
dbkwik:nwn/property/wikiPageUsesTemplate
| |
abstract
| - function SetAILevel (object oTarget, int nAILevel) Sets the current AI Level of the creature to the value specified. Does not work on Players. The game by default will choose an appropriate AI level for creatures based on the circumstances that the creature is in. Explicitly setting an AI level will over ride the game AI settings. The new setting will last until SetAILevel is called again with the argument AI_LEVEL_DEFAULT.
* AI_LEVEL_DEFAULT - Default setting. The game will take over seting the appropriate AI level when required.
* AI_LEVEL_VERY_LOW - Very Low priority, very stupid, but low CPU usage for AI. Typically used when no players are in the area.
* AI_LEVEL_LOW - Low priority, mildly stupid, but slightly more CPU usage for AI. Typically used when not in combat, but a player is in the area.
* AI_LEVEL_NORMAL - Normal priority, average AI, but more CPU usage required for AI. Typically used when creature is in combat.
* AI_LEVEL_HIGH - High priority, smartest AI, but extremely high CPU usage required for AI. Avoid using this. It is most likely only ever needed for cutscenes.
* Return type: void
* Include file: nwscriptdefn
- The SetAILevel() NWScript command sets the "intensity" at which the AI of an creature should be operating. This does not work on player characters, nor on objects that are not creatures. Normally this command is not needed, as creatures will by default adjust their AI level in response to their circumstances (lower AI when no player characters are in the area, and higher AI when in combat). Its main use is for when the default adjustments are inadequate for some reason. If the AI level is changed from the default, it will remain at the specified level (the game no longer adjusts it due to circumstances) until it is explicitly returned to the default (using AI_LEVEL_DEFAULT).
|