c_target_selector
Functions
get_default_target
Returns current orbwalker target (forced target when current target is overridden).
Argument | Type | Required |
---|---|---|
returns | c_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.
Argument | Type | Required |
---|---|---|
returns | c_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
Argument | Type | Required |
---|---|---|
returns | c_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.
Argument | Type | Required |
---|---|---|
returns | boolean |
if features.target_selector:is_forced() then
print("Target forced")
end
is_bad_target
⚠️
Needs to be called from features thread.
Argument | Type | Required |
---|---|---|
index | number | + |
ignore_dead | boolean | - |
ignore_invisible | boolean | - |
returns | boolean |
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
Argument | Type | Required |
---|---|---|
index | number | c_object | - |
returns | boolean |
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
Argument | Type | Required |
---|---|---|
danger_distance | number | + |
returns | c_objet |
local target = features.target_selector:get_antigapclose_target(400)
if target ~= nil then
print("Got target")
end