Garry's Mod Wiki

ENTITY:OnStateChange

  ENTITY:OnStateChange( number oldState, number newState )

Description

Called by the engine when NPC's state changes.

This hook only exists for ai type SENTs.

Arguments

1 number oldState
The old state. See NPC_STATE enum.
2 number newState
The new state. See NPC_STATE enum.