Skip to content

antiaim_context_t

Info

antiaim context can only be retrieved via the ANTIAIM callback in all examples below ctx is the antiaim context

function on_antiaim(ctx)
    ctx:set_yaw(180)
end

callbacks.add(e_callbacks.ANTIAIM, on_antiaim)

Functions#

set_pitch#

overrides the pitch for the next antiaim call

void set_pitch(<float> pitch)

Example

ctx:set_pitch(89) -- force down pitch
Fields Description
pitch
float

set_yaw#

overrides the yaw for the next antiaim call

void set_yaw(<float> yaw)

Fields Description
yaw
float

Example

ctx:set_yaw(0) -- force forwards yaw

set_desync#

overrides the desync delta for the next antiaim call

void set_desync(<float> desync_factor)

Fields Description
desync_factor
float
desync factor (range -1···1)

Example

ctx:set_desync(1.0) -- force right desync

set_body_lean#

overrides the body lean delta for the next antiaim call

void set_body_lean(<float> lean_factor, [optional] <bool> always_body_lean)

Fields Description
lean_factor
float
body lean factor (range -1···1)
always_body_lean
bool
[optional] always body leans

Example

ctx:set_body_lean(1.0) -- force right body lean

set_render_pose#

overrides the specified pose parameter for the next local animation update

void set_render_pose(<e_poses> pose_index, <float> pose_value)

Fields Description
pose_index
e_poses
the pose parameter to override
pose_value
float
the new pose parameter value

Example

ctx:set_render_pose(e_poses.BODY_PITCH, 0.5) -- force visual pitch to 0

set_render_animlayer#

overrides the specified animlayer for the next local animation update

void set_render_animlayer(<e_animlayers> layer_index, [optional] <float> weight = -1.0, [optional] <float> cycle = -1.0)

Fields Description
layer_index
e_animlayers
the animlayer to override
weight
float
the weight that will be applied to the animlayer, set to -1.0 if you dont want to override it
cycle
float
the cycle that will be applied to the animlayer, set to -1.0 if you dont want to override it

Example

ctx:set_render_animlayer(e_animlayers.MOVEMENT_MOVE, 0.0, 0.0) -- remove all leg movement

set_invert_desync#

overrides the desync invert for the next antiaim call

void set_invert_desync(<bool> invert)

Fields Description
invert
float
whether it should be inverted

Example

ctx:set_invert_desync(true) -- force invert

set_invert_body_lean#

overrides the desync invert for the next antiaim call

void set_invert_body_lean(<bool> invert)

Fields Description
invert
float
whether it should be inverted

Example

ctx:set_invert_body_lean(true) -- force invert

set_fakelag#

overrides whether the current tick will be a choked tick or not

void set_fakelag(<bool> should_lag)

Fields Description
should_lag
float
whether this tick will be choked

Example

ctx:set_fakelag(true) -- forces current tick to be choked
-- or...
ctx:set_fakelag(false) -- forces current tick to be sent