Kiitsunee Posted December 26, 2015 Share Posted December 26, 2015 Anyone here knows how to edit the lantern so it never burns out? I know it sounds OP. But I want to make a main base where there is light everytime, also, I want to change the radious of where you "cant build" from the walls, I think it's too wide and if it's possible for someone here to teach me I would be grateful. Link to comment https://forums.kleientertainment.com/forums/topic/61409-lantern/ Share on other sites More sharing options...
Mobbstar Posted December 26, 2015 Share Posted December 26, 2015 Depends. If you want to edit the existing lantern, you want to add the following to modmain.lua: AddPrefabPostInit("lantern",function(inst)--your code hereend) If you want a seperate kind of lantern for this, you want to make a new prefab file, but with this main function: local function fn()local inst = SpawnPrefab("lantern") --your code here return instend The only difference between the two methods is: The former affects all existing lanterns, the latter makes a new type of lantern that must be crafted, spawned or obtained some other way. Link to comment https://forums.kleientertainment.com/forums/topic/61409-lantern/#findComment-702200 Share on other sites More sharing options...
Kiitsunee Posted December 26, 2015 Author Share Posted December 26, 2015 What's that part about "your code here"? I don't know anything about modding tbh. Link to comment https://forums.kleientertainment.com/forums/topic/61409-lantern/#findComment-702257 Share on other sites More sharing options...
Arkathorn Posted December 26, 2015 Share Posted December 26, 2015 Take a look at the use of the 'finiteuses' component in the lantern's code. This components governs durability, so you should use 'inst.components.finiteuses:SetMaxUses(newdurability)' to change it. Link to comment https://forums.kleientertainment.com/forums/topic/61409-lantern/#findComment-702280 Share on other sites More sharing options...
Kiitsunee Posted December 26, 2015 Author Share Posted December 26, 2015 I took it from another post, but basically what you're telling me to do is: AddPrefabPostInit("<span class="searchlite">lantern</span>", function(inst) inst.components.fueled.rate = 0end) This? Wait, no. This one is for a new made lantern so... Would be something like this? AddPrefabPostInit("lantern",function(inst) inst.components.fueled.rate = 0 Link to comment https://forums.kleientertainment.com/forums/topic/61409-lantern/#findComment-702285 Share on other sites More sharing options...
Kiitsunee Posted December 28, 2015 Author Share Posted December 28, 2015 No? Link to comment https://forums.kleientertainment.com/forums/topic/61409-lantern/#findComment-702987 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