Jump to content

Recommended Posts

Hello everyone, today I am here to ask for some help on this:

 

I got a "vampire" custom character, it is working perfectly. Since she is a vampire, during the day, she looses heath(with negative health regeneration) over time, and during Dusk and Night she start regenerating health.

Again, this is working perfectly, but the is something I don't know how to start: I want to make her stop loosing heath during the day by wearing an umbrella(any of them). That's my main goal here, but I want help with something else:

 

My character(the same vampire) is immune to freeze damage since I used the fallowing comand:

 

inst.components.temperature.hurtrate = 0

 

But there is a problem: I don't take damage from freezing, but the game keep showing the "damage screen".

What can I do to stop it? Thank you everyone c:

@SolidZero,

 

Making the character immune to freezing with this line of code.

 

inst:RemoveComponent("freezable").

 

It won't freeze, so it won't show the damage screen. 

@Kzisor

 

Hey, thx for the feedback. I tried that command you gave me, but it is not working, the character is receiving freeze damage and the screen is showing normally. I tried it in putting it in different lines, but it still  doesn't work.

Should I put it in any special place?

Thank you.

@Kzisor

 

Hey, thx for the feedback. I tried that command you gave me, but it is not working, the character is receiving freeze damage and the screen is showing normally. I tried it in putting it in different lines, but it still  doesn't work.

Should I put it in any special place?

Thank you.

 

Yes sorry, it needs to go in your modmain in the following way.

 

AddPrefabPostInit("Character prefab name here", function(inst)

inst:RemoveComponent("freezable")

end)

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