Gesture/Sequence Functions
Gesture
Make an NPC perform a gesture
Syntax
Gesture [gesture_name]
-- Play gesture by name
Gesture [gesture_name,duration]
-- Play gesture with duration
Gesture [gesture_name,duration:bias]
-- Play gesture with optional duration and bias
Note
bias
is the max amount of time that is randomly generated and tacked onto the gesture duration!
Example
Gesture g_onfire // Do on fire gesture forever, until reset
Gesture g_emote_afraid,2:2 // Do afraid gesture with duration of 2 seconds and a bias of 2
Gesture g_onfire,3 // Do on fire gesture for 3 seconds
ResetGesture
Reset an NPC's gesture(s)
Syntax
ResetGesture [gesture_name]
-- Reset specific gesture by name
ResetGesture 1
-- Reset current gesture
ResetGesture all
-- Reset ALL gestures
ResetGesture *
-- Reset ALL gestures
ResetGesture g_onfire // Reset specific gesture by name
ResetGesture 1 // Reset current gesture
ResetGesture all // Reset ALL gestures
ResetGesture * // Reset ALL gestures
Sequence
Sets the NPC's sequence
Syntax
Sequence [sequence_name]
-- Set sequence by name from ai_activities.p3s
Sequence seq.[sequence_name]
-- Set sequence by name from entity model
Sequence [sequence_name,duration]
-- Set sequence with duration
Sequence [sequence_name,duration:bias]
-- Set sequence with optional duration and bias
Note
bias
is the max amount of time that is randomly generated and tacked onto the gesture duration!
Example
Sequence emote_yo // from ai_activities.p3s
Sequence seq.env_crouch_inspect // from the entity's model
ResetSequence
Reset an NPC's sequence
Syntax
ResetGesture 1
-- Reset current sequence
ResetGesture 1 // Reset current sequence