Search the Community
Showing results for tags 'wetness'.
Found 2 results
Sanity drain from being wet from rain
posted a topic in [Don't Starve Together] Mods and ToolsHello there! So i was trying to create a character wich would lose sanity when it would be raining,tried to code it myself and looked here and there but nothing seems to work. I looked up how WX-78 loses his health during rain and tried to modify the code but it seems to not work at all So if anybody could help me i would appreciate it a lot!
Percentage rate glitch?
posted a topic in [Don't Starve Together] Mods and ToolsSo, I'm trying to re-work WX-78's rate of wetness damage, so that it would increase (be faster) the more wetness he has. So, this is what I have: --Declares a variable that is the current moisture of the player character local wetness_percent = inst.components.moisture:GetMoisture() --Determines how long until the next spark happens inst.spark_time_offset = (3 *(1 -wetness_percent)) + 1 The code above would mean that at just above 0 wetness, the rate would be 4 seconds, while being 1 second at full wetness. That is if 100% = 1 in terms of numbers. However, when testing it, just above 1 wetness, the rate starts to become extremely fast. Why is that? Any way I can fix this and make this work correctly? I've been trying to get this working for like an hour now and no amount of change fixes it. It's either too slow at times or way too fast