Recommended Posts

BigCSniper    5

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.

Share this post


Link to post
Share on other sites
Sudura2017    449

Ah, sorry for not updating with any info - I'll get you the name in just a sec.

 

lavae_pet.lua inside Scripts/Prefabs @BigCSniper - If you still need help I'm happy to assist.

Edited by Sudura2017

Share this post


Link to post
Share on other sites
BigCSniper    5

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. :)

Share this post


Link to post
Share on other sites
BigCSniper    5

One quick useful tip. Anyone trying to use these codes should probably add this as well

inst.components.health.fire_damage_scale = 0

I believe it speaks for itself. (You won't die from your own fire)

Share this post


Link to post
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
Sign in to follow this