Jump to content

Recommended Posts

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

Depends. If you want to edit the existing lantern, you want to add the following to modmain.lua:

 

AddPrefabPostInit("lantern",function(inst)

--your code here

end)

 

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 inst

end

 

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.

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 = 0
end)
 
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

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...