shaligater Posted June 20, 2016 Share Posted June 20, 2016 So I've been trying to make it so that when my character has any amount of wetness they get a very large sanity drain I have the code working but it's not a big enough drain and it only activates at more than 55 wetness. here's my code local function NAMEHERE(args) if(inst.components.moisture:GetMoisture() > 0) then inst.components.sanity.dapperness = -(Huge) else inst.components.sanity.dapperness = 0 end end how do I make it work how I want it to? Link to comment Share on other sites More sharing options...
DarkXero Posted June 21, 2016 Share Posted June 21, 2016 inst.components.sanity.custom_rate_fn = function(inst) local moist_sanity = 0 if inst.components.moisture:GetMoisture() > 55 then moist_sanity = -TUNING.DAPPERNESS_LARGE end return moist_sanity end Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.