Setting up the package - GalaxHD551/lightstreamer GitHub Wiki
The package directory
Once you downloaded the package, you need to put it in your OnsetServer directory, in the package directory.
Modifying the server config
So now you will need to modify your server_config.json
Make sure to put "lightstreamer" before the package where your planing to use it
See an exemple here :
"packages": [
"lightstreamer",
"YourBasePackage"
],
Importing the package
After this, you have to import the lightstreamer into the package you are going to use
Go into your lua file, and put the following code in the top of your file
lr = ImportPackage("lightstreamer")
Utilisation
Now, you can use all functions in the lightstreamer package, all you need to do is putting lr.
before each lightstreamer functions. like :
lr.CreateLight("POINTLIGHT", x, y, z)
Error resolution
If you start you server and getting an error like:
attempt to index a nil value (global 'lr')
That's mean in most case that the lighstreamer package failed to launch. Check this page again and make sure you have done corretly all what is here.
For finish
If you don't get any errors you should be good using the lighstreamer package now. Take a look to the others pages on the wiki to know all the usable functions.