Jump to content

Recommended Posts

I have been making a character mod and my character is a type of fire elemental. I have been looking in all the fire type prefabs for don't starve together but I cannot find a code to make my character have the effect of fire. The effect I am looking for is my character to give off a heat that can set trees on fire like a level 4 campfire. Thank you.

Link to comment
Share on other sites

Thank you Sudura2017! This was like the final piece of the puzzle and with the lavae script I was able to find the common denominators between all of the fire scripts, so I was able to complete it.

 inst:AddComponent("propagator")
 inst.components.propagator.propagaterange = 10
    inst.components.propagator.heatoutput = 20
    inst.components.propagator:StartSpreading()

this is one part of the heat taken from the lavae pet lua, however you can notice that I have increase the values a bit (like four times as much)

  inst:AddComponent("heater")
 
 inst.components.heater.heat = MAX_HEAT

local MIN_HEAT = 15
local MAX_HEAT = 210

and these were the final parts. Again I increased the max heat to 210 instead of 100 just to fit my needs. Thank you again. :)

Link to comment
Share on other sites

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
 Share

×
  • Create New...