Requirements: Health package and setup on player
This is a basic script and widget. It was designed as a stepping stone. The goal was to explore a mechanic of a second type health bar which could affect health and function as a separate resource. This could be expanded to armor, shields, breath, etc. or just a modified version of this script.
How to use:
Add the Player Warmth Script to the player as shown here. It will damage health after there is no more warmth.
Highly suggest these setting be modified before use:
- if you want to adjust the heat settings, check the heat box.
- if you want to adjust the freeze setting, check the freeze box.
- chillStart is disabled by default - enable it to have the player freeze on spawn.
The Campfire template:
To warm the player, a heat source is needed. This contains a trigger box on the campfire with these settings: (use as a reference if needed for customization)
- add Script
- Set On enter to
- Set On exit to
2020-12-17 - added campfire template
2020-01-13 - added warmthTriggerScript for Campfire
2020-02-12 - line 115 had an error, changed to heatTask
2021-02-12 - changed the campfire to Warmth Trigger
2021-03-02 - added radius, timetolive, rechargetimer, destroy, and effects toggle