AiParams.allowBeingTargeted 64

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

Disable being targeted (network safe)

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

Back to Scripting API