that is fairly straight forward, just use either my (if you have a copy of it still - was in the \external folder) or stinkytwich's ObjectManager.lua
Or depending on your level, you can work out how to insert it in.
These are the functions - load them in your library.
Code:
ProbablyEngine.condition.register("facing", function(unit, target)
local unitExists = UnitExists(unit)
local targetExists = UnitExists(target)
if not unitExists or not targetExists then
return
end
if FireHack then
if ObjectIsFacing(unit, target) then
return true
else
return false
end
else
if Ake.listenerNotFacingTarget == true then
return false
else
return true
end
end
end)
and
Code:
Ake.listenerNotFacingTarget = nilProbablyEngine.listener.register("UI_ERROR_MESSAGE", function(...)
local args = ...
if args == "Target needs to be in front of you." and UnitExists("target") then
Ake.listenerNotFacingTarget = true
else
Ake.listenerNotFacingTarget = false
end end)
This is the condition used in the CR:
"player.facing(target)"
Example usage:
{ "Wind Shear", { "modifier.interrupt", "target.interruptAt(30)", "player.facing(target)" } },