Search the Community
Showing results for tags 'spark'.
Found 1 result
So, 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