Garry's Mod Wiki

ENTITY:TranslateActivity

  number ENTITY:TranslateActivity( number oldAct )

Description

Called by the engine to alter NPC activities, if desired by the NPC.

This hook only exists for ai type SENTs.

Arguments

1 number with ACT enum oldAct
The activity to translate.

Returns

1 number with ACT enum newAct
The activity that should override the incoming activity.

Not returning anything, or returning a non value will perform the default action.