AiParams.allowBeingTargeted 4

If enabled, enemies will target this soldier whenever they see him. If disabled, the soldier will be completly ignored by enemies.
Toghether with allowCheckForEnemies, this function is helpful to script systems like Civilian or Non combatant medics.


Return value

Return TypeDescription
voidThis function doesn't return anything

Parameters

ParameterTypeDescription
1boolEnable or disable the feature

Examples

myself().getAiParams().allowBeingTargeted(false) -- prevents enemy from targeting this unit

Back to Scripting API