I need it to fire only when a specific unit detects the target, so I need a Lua condition that uses ScenEdit_UnitY() to get the detecting unit. I have one single Lua condition for this purpose.
So I have this code for the Lua condition:
local by = ScenEdit_UnitY()
return by.unit.guid == 'XiaoZhanMa-GUID'
This was working perfectly fine earlier but at some point, for no apparent reason, 'by' is coming up as either nil or empty string every time it runs.
Shoulnd't ScenEdit_UnitY() get set to the detecting unit for both conditions and actions?

