AiParams.allowFollowOrders 0

When enabled, AI will automatically follow squad leader orders. If you want to move this specific unit with your custom scripts, for example by using Soldier.moveTo function, most likely you want this to be disabled


Return value

Return TypeDescription
voidThis function doesn't return anything

Parameters

ParameterTypeDescription
1boolSet the AI functionality enabled

Examples

-- prevents AI from following squad orders. Ai will still follow commands such as soldier.moveTo()
myself().getAiParams().allowFollowOrders(false)

-- move the AI to a custom positon
myself().moveTo(vec3(10,20,30))

Back to Scripting API