Custom scripts
From Spherical
(Redirected from Custom script)
It's not always necessary to reinvent the wheel - browse the Script category to see whether or not some of the scripts could be of use to you. To include a custom script in your game, resort to one of these methods:
- Copy it into the script folder of your game and place RequireScript('filename.js') on top of your main script. This method is especially recommended if you want to distribute your game or program without the engine. OR:
- Copy the script to %SPHERE_ROOT%\common\ and reference via RequireScript('/common/filename.js'). Scripts and files placed inside the mentioned directory will be available to all games of your Sphere installation. OR:
- Copy it to %SPHERE_ROOT%/system/scripts and reference via RequireSystemScript('filename.js'). It'll be be usable as if it was a system script that comes with Sphere.