Garry's Mod Wiki


  ENTITY:OnTaskFailed( number failCode, string failReason )


Called when a task this NPC was running has failed for whatever reason.

This hook only exists for ai type SENTs.


1 number failCode
The fail code for the task. It will be a FAIL_ enum or a generated code for a custom string. (second argument)
2 string failReason
If set, a custom reason for the failure.