I use console logging all the time! In many cases it's the fastest and most efficient method of debugging in Construct.
Any cool functions anybody has made to make the logging more robust and easily repeatable across different events?
I have a _LOG function, but only so that I could easily disable all logging when I prepare a release build.
ChatGPT gave me this function that allows to override the default implementation of "Browser Log" action and it works.
(function() {
// Save the original console.log method
const originalLog = console.log;
// Override console.log with your custom implementation
console.log = function(...args) {
// Add additional information, such as a timestamp
const timestamp = new Date().toISOString();
// Call the original console.log with modified arguments
originalLog(`[${timestamp}]`, ...args);
};
})();
However, I don't think it would be possible to include an event sheet name or event number, because these expressions are not available in scripting.