Dofile

Use this command to include additional lua files.

Finding the local path :

/scripts/main.lua' -> from here call dofile("other/additional.lua") /scripts/other/additional.lua

/scripts/something/main.lua -> from here call dofile("../other/additional.lua") /scripts/other/additional.lua

Example : This script will add an external light effect library

dofile("lights/lightsfx.lua") light = getObject("Light") function onSceneUpdate flickerLightEffects(light) end