First: using example file
Run "RUNFILE.lua", for example write "dofile("./sys/lua/RUNFILE.lua")" in "server.lua"
You can experience the functions.
Second: including core file(assuming the files in "./sys/lua/" path)
If you want to use it,please include "MAINFUNC.lua",
and before including,new a global variable "StartENTITY",initialize it with int type, like "StartENTITY = 0". and then write "dofile("./sys/lua/MAINFUNC.lua")".
Why?Because I think it may help someone to manage entity's ID.
[How to write]
You may don't know the functions' functions, so you can see the descriptions in the "MAINFUNC.lua" file.
Remebering some functions that need you to write will passing parameter "objID".
Maybe the codes in "RUNFILE.lua" looks like a s**t mountain(Incomprehensible).
I'm sorry for last guidance,because it looked really too simple.
And I test files in a pure cs2d,it can run.
edited 3×, last 07.06.24 06:29:42 am
Declined by GeoB99
The file description is utterly incomprehensible and the uploaded image doesn't really clarify what does the Lua script do. Furthermore the Lua script is just a wrapper of copied code around the place that adds unnecessary complexity, with the sole purpose to "spawn" an entity...? What a mess.
Download
7 kb, 35 Downloads