1. How to use UnitX feature? I've setup a trigger "unit remains in area" and added Lua script action. The event is fired and so is the script, but I don't know how to use UnitX to get to the unit that triggered event. I've tried:
Code: Select all
my_var=UnitX
my_var=ScenEdit_GetUnit({side="A", name=my_var})
ScenEdit_AddReferencePoint({side="A", name=my_var, latitude="N54.44.42", longitude="E18.48.42"})
Code: Select all
my_var=UnitX.name
ScenEdit_AddReferencePoint({side="A", name=my_var, latitude="N54.44.42", longitude="E18.48.42"})
2. Is there a way to do some debug printing in actions? print() works in script console, but I don't see output when script is run as action.