how to make lua files work

There are 2 ways that I know of that can be used to make Lua work. You can simply download any other Lua mod and just replace the text inside with your own code, or you can use a wad editor such as SLADE to put your Lua into a wad. Because you're a beginner, I'd recommend the first.
 
how to make lua files work
It is impossible to give you an answer when you are super vague on what do you mean with this.
It helps us a lot if you elaborate what exactly are you doing or what are you attempting to do, how are you getting there, and what do you expect for it to do.

To have a Lua script to work, the which I assume is one you made on your own, first you make sure it is written correctly.
Then you either save it as a file ending with .lua, or you save it inside a .pk3 mod, whereupon the mod should have a folder named Lua inside for the script to go into.
Then you load the .lua script, or the mod containing the script.
If everything goes correctly, the console won't spit warnings and your script will do what it is supposed to do.
 
It is impossible to give you an answer when you are super vague on what do you mean with this.
It helps us a lot if you elaborate what exactly are you doing or what are you attempting to do, how are you getting there, and what do you expect for it to do.

To have a Lua script to work, the which I assume is one you made on your own, first you make sure it is written correctly.
Then you either save it as a file ending with .lua, or you save it inside a .pk3 mod, whereupon the mod should have a folder named Lua inside for the script to go into.
Then you load the .lua script, or the mod containing the script.
If everything goes correctly, the console won't spit warnings and your script will do what it is supposed to do.
How do I do that with a .wad
Post automatically merged:

sorry I have school that is why it took long for me to reply
 
Last edited:
Alright so pk3 is easier to handle than wad but they're basically the same thing, wad just doesn't have folders so its more cluttered. So basically you have to open SLADE (I assume you're using SLADE but if not then I'm not sure how to make wads) and then there is a button in the top left which looks like a green piece of paper or you can just go into File and there's a button called new and then click on archive and then choose Doom WAD Archive. Then you can import your lua file and the icon might look like a question mark but you just have to rename it to "LUA_(any 4 letter name or abbreviation to what your lua is to help with finding different scripts if you have many)". Hope this helps ;)
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top