Insert message into log with lua?
Posted: Sat Sep 01, 2018 2:46 pm
Is there a way to insert a message via lua into the log without a pop-up/special message?
I am playing around with using a single lua event to handle scoring and it works well except I am using Unit Destroyed as a trigger, and Weapons fall into that category, so my log has lots of Unit Destroyed Events showing when they are really just weapons not actual units. I could turn off Display in Log, but then I wouldn't get anything in the log. I'd like to just insert a log line item as I see fit, just like print works in the lua history - so maybe print_log("message here").
I do have a print statement that prints to the lua history log which is fine for me as I use that constantly but other people probably wouldn't use it.
I am playing around with using a single lua event to handle scoring and it works well except I am using Unit Destroyed as a trigger, and Weapons fall into that category, so my log has lots of Unit Destroyed Events showing when they are really just weapons not actual units. I could turn off Display in Log, but then I wouldn't get anything in the log. I'd like to just insert a log line item as I see fit, just like print works in the lua history - so maybe print_log("message here").
I do have a print statement that prints to the lua history log which is fine for me as I use that constantly but other people probably wouldn't use it.