Garry's Mod Wiki

hltv_chase

Description

Called when the view changes

Members

number distance
The distance from the Target.
number inertia
The inertia.
number ineye
1 if we should use OBS_MODE_IN_EYE. else, we use OBS_MODE_CHASE
number phi
The phi.
number target1
The EntIndex of the Primary target.
number target2
The EntIndex of the Secondary target.
number theta
The theta.

Examples

Example

This is a basic template with the purpose of including all arguments / table variables to make it easily known which values can be accessed.

gameevent.Listen( "hltv_chase" ) hook.Add( "hltv_chase", "hltv_chase_example", function( data ) local distance = data.distance -- The distance from our Target local inertia = data.inertia -- The inertia local ineye = data.ineye -- If we should use OBS_MODE_IN_EYE local phi = data.phi -- The phi local target1 = data.target1 -- The Entity:EntIndex() of our Primary Target local target2 = data.target2 -- The Entity:EntIndex() of our Secondary Target local theta = data.theta -- The theta -- Called when the view changes end )