Garry's Mod Wiki

NPC:TaskFail

  NPC:TaskFail( string failReason )

Description

Marks the current NPC task as failed.

This is meant to be used alongside NPC:TaskComplete to complete or fail custom Lua defined tasks. (Schedule:AddTask)

Arguments

1 string failReason
Fail reason to be passed onto ENTITY:OnTaskFailed. The fail reason can also be seen when the NPC's ent_text is active.