Classes
c_target_selector

c_target_selector

Functions

get_default_target

Returns current orbwalker target (forced target when current target is overridden).

ArgumentTypeRequired
returnsc_objet
local target = features.target_selector:get_default_target()
 
if target ~= nil then
    -- draw circle around current target
    g_render:circle_3d(target.position, color:new(255, 255, 255), 50, 2, 25, 2)
end

get_secondary_target

get_orbwalker_default_target

Returns current orbwalker target only when in AA range.

ArgumentTypeRequired
returnsc_objet
local target = features.target_selector:get_orbwalker_default_target()
 
if target ~= nil then
    -- draw circle around current target
    g_render:circle_3d(target.position, color:new(255, 255, 255), 50, 2, 25, 2)
end

get_forced_target

ArgumentTypeRequired
returnsc_objet
local target = features.target_selector:get_forced_target()
 
if target ~= nil then
    -- draw circle around forced target
    g_render:circle_3d(target.position, color:new(255, 255, 255), 50, 2, 25, 2)
end

is_forced

Check wheter there is currently a forced target.

ArgumentTypeRequired
returnsboolean
if features.target_selector:is_forced() then
    print("Target forced")
end

is_bad_target

⚠️

Needs to be called from features thread.

ArgumentTypeRequired
indexnumber+
ignore_deadboolean-
ignore_invisibleboolean-
returnsboolean
if features.target_selector:is_bad_target(0) then
    print("Bad target")
end

force_target

Override default target. Returns true when successful.

⚠️

To reset forced target call force_target with nil or -1 as object argument

ArgumentTypeRequired
indexnumber | c_object-
returnsboolean
local target = features.target_selector:get_default_target()
 
-- pass target index
features.target_selector:force_target(target.index)
-- or object instance
features.target_selector:force_target(target)
 
-- reset target
features.target_selector:force_target(nil)
-- or
features.target_selector:force_target(-1)

get_antigapclose_target

ArgumentTypeRequired
danger_distancenumber+
returnsc_objet
local target = features.target_selector:get_antigapclose_target(400)
 
if target ~= nil then
    print("Got target")
end