SuperMeatGoy Posted June 21, 2020 Share Posted June 21, 2020 My modmain is getting pretty messy with AddPrefabPostInit functions. Is there anyway I can transfer the code out of the modmain and into new files? Link to comment Share on other sites More sharing options...
-t- Posted June 21, 2020 Share Posted June 21, 2020 You can create .lua files in your mod folder or in a folder that's in your mod folder. In order to make them work you have to write "modimport("yourfilepath")" in your modmain.lua. For example: if you have a lua file in your mod folder named code.lua you'll have to write "modimport("code")". However if this file is in a folder that's in your mod folder you'll have to write "modimport("folder/code")". 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now