Enemy
enemies
This fakeunit retrieves a list of enemy units from the Object Manager.
Returns TABLE
- Returns a table indexed by GUID, containing the enemy units.
Examples:
-- DSL Mode
{ACTION, CONDITIONS, "enemies"},
-- Lua Mode
local enemies = _A.OM:Get('Enemy')
for _,Obj in pairs(enemies) do
-- Do something with the object
print( Obj:Distance() )
end
nearEnemy
This fakeunit finds the nearest enemy that is also in front of the player.
Returns guid/key
- Returns the nearest enemy in front of the player.
Examples:
-- DSL Mode
{ACTION, CONDITIONS, "nearEnemy"},
-- Lua Mode
local nearE = Object("nearEnemy")
if nearE then
-- Do something with the nearE object
print( nearE.name )
end
enemyID
This fakeunit finds enemies with a specific ID.
Parameters
NUMBER
: Theid
of the enemy to search for.
Returns guid/key
- Returns the enemy with the specified ID that is closest in distance.
Examples:
-- DSL Mode
{ACTION, CONDITIONS, "enemyID(12345)"},
-- Lua Mode
local enemy = Object("enemyID(12345)")
if enemy then
-- Do something with the enemy object
print( enemy.name )
end
lowestEnemyInRange
This fakeunit finds the lowest health enemy within a specified range from a target.
Parameters
NUMBER
: Therange
to compare.STRING
: Theunit
with which to compare the range.
Returns guid/key
- Returns the lowest health enemy within the specified range of the unit.
Examples:
-- DSL Mode
{ACTION, CONDITIONS, "lowestEnemyInRange(40, player)"},
-- Lua Mode
local lowestEnemy40 = Object("lowestEnemyInRange(40, player)")
if lowestEnemy40 then
-- Do something with the lowestEnemy40 object
print( lowestEnemy40.name )
end
enemyTotemID
This fakeunit finds enemies (totems) with a specific ID.
Parameters
NUMBER
: The id of the enemy (totem) to search for.
Returns guid/key
- Returns the enemy (totem) with the specified ID.
Examples:
-- DSL Mode
{ACTION, CONDITIONS, "enemyTotemID(8888)"},
-- Lua Mode
local totem = Object("enemyTotemID(8888)")
if totem then
-- Do something with the totem object
print( totem.name )
end
enemyTotemName
This fakeunit finds enemies (totems) based on their name.
Parameters
STRING
: The name of the enemy (totem) to search for.
Returns guid/key
- Returns the enemy (totem) with the specified name.
Examples:
-- DSL Mode
{ACTION, CONDITIONS, "enemyTotemName(totem_name)"},
-- Lua Mode
local totem = Object("enemyTotemName(totem_name)")
if totem then
-- Do something with the totem object
print( totem.name )
end