-
Notifications
You must be signed in to change notification settings - Fork 4
Setting Up a New Project
JasXSL edited this page Nov 29, 2017
·
9 revisions
- Create a subfolder under your includes on disk. Ex:
C:\LSL\MyFirstProject
- Create a file in that folder and name it
_core.lsl
- In the first line of _core.lsl enter
#include "xobj_core/_ROOT.lsl"
and hit enter. It's important that all preprocessor files end with a blank line. - Save your file.
- Create a new script in SL and name it
#ROOT
. #ROOT is the XOBJ standard input manager. You can find a template #ROOT file to copy and paste into your script here. Don't forget to replace#include "xobj_core/_ROOT.lsl"
with#include "MyFirstProject/_core.lsl"
to implement your own project. For more information about the purpose of #ROOT, see #ROOT
_core.lsl is an autoloader and global config for your project. The file should have content structured as such (starting from the top of the script):
- Config definitions, such as
#define PC_SALT 1337
. -
#include "xobj_core/_ROOT.lsl"
which includes the XOBJ framework. - Additional includes for header files (located in /classes of a project or XOBJ official modules).
- Any project-wide functions, constants, macros etc that you want to use.