Jump to content

Recommended Posts

i want my character to be immune to overheating and to freezing. i assume this is set in the heater component and insulator component. i input these lines into my character prefab, but it states that both are a nil value. how do i make this work:

    inst.components.heater.iscooler = true    inst.components.insulator:SetInsulation(TUNING.INSULATION_LARGE*12)

im sure i am doing something extremely wrong here, but can i get some help 3:

not at all :grin:

edit: i actually did try to add the components, but idk what im really doing with this. these components exist in the game code, so i thought it should work like the health components. but it appears im wrong about this. im trying to make my character immune to overheating and freezing to death in winter.

Edited by WitchDoctEr16

@WitchDoctEr16, you are going about it the wrong way after looking into the characters of Don't Starve: Reign of Giants.

 

This line is used when it creates all characters including custom characters, which makes them freezable.

MakeHugeFreezableCharacter(inst)

 

In order to make them non-freezable you need to remove the "freezable" component.

 

inst:RemoveComponent("freezable")

 

As far as overheating goes, I'm assuming it has to do with the burnable component, however, if you simply remove the burnable component then you are unable to catch fire period. You will need to look into how overheating actually works, but this should be enough information to get you headed down the right path.

 

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