Menu
Lumberyard
Developer Guide (Version 1.12)

Auto-Disable

You can save CPU time by not updating distant AI agents. Use the auto-disable feature to controlled updates either on a per-AI basis or globally.

Global auto-disable

  • To control auto-disable for all vehicles: use the console variable v_autoDisable.

  • To control auto-disable for all AI agents: use the console variable ai_UpdateAllAlways.

Per-AI auto-disable

Per-AI auto-disable is controlled by the entity property AutoDisable. Refer to the Amazon Lumberyard User Guide for more details on AI and vehicle entities. You can also change this property (and behavior) at run time.

  • C++: pAIActorProxy->UpdateMeAlways(true);

  • Lua: AI.AutoDisable(entity.id, 1);

  • In Flow Graph Editor: turn AI:AutoDisable on or off for each AI.