Menu
Lumberyard
User Guide (Version 1.14)

Using Console Variables to Set Agent Perception

This topic references tools and features that are legacy. If you want to use legacy tools in Lumberyard Editor, disable the CryEntity Removal gem using the Project Configurator or the command line. To learn more about legacy features, see the Amazon Lumberyard Legacy Reference.

You can also use console variables to affect AI agent perception. Console variables are accessed by clicking the (...) icon in the right-corner of Lumberyard Editor.

Unless otherwise noted, the variable type is Boolean and the default value is 0.

  • ai_IgnorePlayer – Determines the degree to which the agent ignores players. A setting of 1 is the same as 0% perception scale (agent ignores players).

  • ai_IgnoreBulletRainStimulus – Determines whether AI agents perceive bullets passing near them.

  • ai_IgnoreVisibilityChecks – Returns certain visibility checks as false.

  • ai_IgnoreVisualStimulus – Notifies the Perception Handler to always ignore visual stimulus.

  • ai_IgnoreSoundStimulus – Determines whether the agent ignores all sounds. Visual and tactile stimuli are not affected.

  • ai_SoundPerception – Determines the degree to which the agent can hear sounds. A setting of 0 causes the agent to ignore all sounds (useful for debugging purposes when used in conjunction with ai_DebugDraw). Default value: 1

  • ai_EnablePerceptionStanceVisibleRange – Determines the maximum perception range for AI based on the player's stance.

  • ai_CrouchVisibleRange – Determines the perception range for AI agents when the player is crouching and ai_EnablePerceptionStanceVisibleRange is enabled. Default value: 15.0

  • ai_ProneVisibleRange – Determines the perception range for AI agents when the player is prone and ai_EnablePerceptionStanceVisibleRange is enabled. Default value: 6.0

For the next three variables, if the isAffectedByLight property is true, this determines the scaling factor for the AI agent's visual perception range under the LIGHTSPOT lighting conditions.

  • ai_SightRangeDarkIllumMod – Has the same effect as the LIGHTSPOT_DARK anchor type. Default value: 0.5

  • ai_SightRangeMediumIllumMod – Has the same effect as the LIGHTSPOT_MEDIUM anchor type. Default value: 0.8

  • ai_SightRangeSuperDarkIllumMod – Has the same effect as the LIGHTSPOT_SUPERDARK anchor type. Default value: 0.25

To set perception properties using Database View

  1. In Lumberyard Editor, click Tools, Other, DataBase View.

  2. On the Entity Library tab, click Load Library to select the applicable entity file.

  3. Select the AI entity in the entity tree.

  4. In the center pane, under Perception, enable properties and set parameter values as needed.