(edit: just realize that "ran" variable was declared just above the if statement, and added it in.)
I just found a block of code in the Function object's runtime that seems to log info to the browser's(?) console when the game is in preview mode.
// Note: executing fast trigger path based on fs.name
var ran = this.runtime.trigger(cr.plugins_.Function.prototype.cnds.OnFunction, this, fs.name);
// In preview mode, log to the console if nothing was triggered
if (isInPreview && !ran)
{
log("[Construct 2] Function object: called function '" + name_ + "', but no event was triggered. Is the function call spelt incorrectly or no longer used?", "warn");
}[/code:3owxtq4i]
What do "isInPreview" and "!ran" represent here? I have a guess, but I haven't come across "isInPreview" in the SDK documentation, though I might have just missed them.
Is this method of logging safe to implement as a third-party plugin developer, or is it a special case thing.
Any weird pitfalls to be aware of?
Just curious. Thanks.