Search the Community
Showing results for tags 'function'.
Found 3 results
-
I know that the variable that sets it to 3 is stored in preparedfoods.lua is "stacksize", which is set to 3, however the function that uses this to make it so that three jelly beans come out of crock pot when they finish cooking is something I can't find anywhere. To my knowledge, it wasn't in edible.lua or crockpot.lua. You do have a special function in preparedfoods.lua for the jellybeans stat table, which looks like this: if eater.components.debuffable ~= nil and not (eater.components.health ~= nil and eater.components.health:IsDead()) and not eater:HasTag("playerghost") then eater.components.debuffable:RemoveDebuff("healthregenbuff") eater.components.debuffable:AddDebuff("healthregenbuff", "healthregenbuff") end but it seems like it has more to do with the health healing of 2 per 2 seconds rather than providing 3 jelly beans in crock pot upon it finishing cooking.
- 4 replies
-
- crock pot
- jelly beans
-
(and 2 more)
Tagged with:
-
How would I be able to run this function client-side only? local function FormVision(inst, phase) if inst.trentform and phase == "night" then inst.entity:AddLight() inst.Light:SetFalloff(0.5) inst.Light:SetIntensity(0.9) inst.Light:SetRadius(15) inst.Light:SetColour(245/255,255/255,245/255) inst.Light:Enable(true) else inst.Light:Enable(false) endend
-
- nightvision
- help
-
(and 5 more)
Tagged with:
-
I know DST doesn't have ROG yet, but I want to put this part in the code for both - DS and DST. It's about to fix character freezing during winter, but not overheating during summer (more less like Wilson's beard, which won't kill him in summer ) Goes in char.lua: inst:WatchWorldState("startday", function(inst) if TheWorld.state.issummer then inst.components.temperature.inherentinsulation = 0 endend) inst:WatchWorldState("startday", function(inst) if TheWorld.state.iswinter then inst.components.temperature.inherentinsulation = 125 endend)Game starts. But when character enters the world such error appears, saying that WorldWatchState is a nil value... in everything.. DST and DS and ROG. I more less know what a nil value is, but just no idea how to fix that here :/
- 10 replies
-
- dont starve
- Together
-
(and 7 more)
Tagged with: