-
Notifications
You must be signed in to change notification settings - Fork 2
Creating your first light
Before starting, you'll require at least basic lua knowledge do follow these steps, please reffer to Lua (SRB2 Wiki) in order to learn about this programming language and SRB2's functions and features.
However, feel free to copy any code shown here and give it some trial and error.
On this guide, we're using a lot the term "Corona" which is generally used to refer these lights back in SRB2 Final Demo
Make a blank lua script file, it could be inside your addon or just standalone.
To define and register an object to make it have a corona, we're using a table named LightObjects which tells Lighting System which objects will gonna have a corona.
We must make sure this table exists globally first, so in your first line of your script should have the following code:
if not LightObjects then rawset(_G, "LightObjects", {}) end