// ...in the worldScript (outside of any function...)
if(!OXP){var OXP = {};} // creates an "OXP" object in the global space
OXP.JEM = {}; // A "JEM" object as a property of "OXP", claiming a chunk of the OXP object for myself (JEM -- my initials).
OXP.JEM.RLE = {}; // An "RLE" object to provide a home for everything "Real-life Economics"-related...
// ... then in the market script (or whatever other script to which I need a reference)
OXP.JEM.RLE.someCleverlyNamedProperty = this;
I can then refer to that script from any other script... as can anyone else from any script in any OXP...
Anybody else who wants a piece of the action can attach their own JEM-equivalent object to "OXP" and have at it!
One little object in the global space isn't really such a big deal, right?
But that depends on doing stuff from the market script; you asked if you could access market scripts from world scripts, not whether you could access world scripts from market scripts.
You don't need a global object for that, just use a normal world script:-
"There are large, white swans, and there are small, black swans," he explained, "But there are no medium-sized swans, and there are no grey swans. The non-existence of grey swans mitigates against belief in Mr Darwin's theory."
I didn't know worldScripts could be used that way... I thought the only properties of worldScripts were the this.name properties of the loaded world scripts...