_Burnt_ Posted October 30, 2020 Share Posted October 30, 2020 This is my first time coding lua, and DST in general, so I dont know where to look for the things that I need. Im trying to make my character's stats increase and decrease with temperature, but it does not seem to work. This is what I tried doing: inst.components.health:SetMaxHealth(TUNING.CHARACTER_HEALTH * inst.components.temperature.current / 40) inst.components.combat.damagemultiplier = inst.components.temperature.current / 40 A helping hand would be highly appreciated. ^^ Link to comment Share on other sites More sharing options...
CarlZalph Posted October 30, 2020 Share Posted October 30, 2020 Put that code in the master_postinit callback for a Listen Event for "temperaturedelta" callback. 2 Link to comment Share on other sites More sharing options...
_Burnt_ Posted October 31, 2020 Author Share Posted October 31, 2020 7 hours ago, CarlZalph said: Put that code in the master_postinit callback for a Listen Event for "temperaturedelta" callback. I'll see what I can do. Thank you. ^^ Link to comment Share on other sites More sharing options...
_Burnt_ Posted October 31, 2020 Author Share Posted October 31, 2020 I managed to make it work. Thank you soo much. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now