Sign in to follow this  
Woodside235

[Scripting] health decay

Recommended Posts

Woodside235    1

Is there a way to make health decay similar to the way sanity drops in the dark?

 

I have a character that takes sun damage and currently I'm using DoPeriodicTask and inst.components.health:DoDelta()

 

It works, but it's rather distracting to hear the health lost sound effect every second or so and to not have that fancy black arrow over the health bar.

Share this post


Link to post
Share on other sites
V2C    5953

The second parameter to health:DoDelta is a boolean.  If you pass true, it will not trigger a pulse.

Share this post


Link to post
Share on other sites
Woodside235    1

@Woodside235, function Health:DoDelta(amount, overtime, cause, ignore_invincible, afflicter) 

 

If I set cause to something, will it not say "Player died to shenanigans" and instead "Player died to cause"? Or do I need to change the afflicter for that?

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