I'd like to use math functions. i.e. math.distance(...).
Is there any way to access system expressions in scripts, or has anyone found a work-around?
You can't call expressions directly from script. You can pass values in variables though as shown in the integrating events with script example.
In this case it's really not worth the trouble though. The expression is a single line of JavaScript:
function distanceTo(x1, y1, x2, y2) { return Math.hypot(x2 - x1, y2 - y1); }
Develop games in your browser. Powerful, performant & highly capable.
The integrated event style is how I've been going about it, but I do feel like sometimes it creates more complexity.
Thank you, sir