Ivysaur Posted November 30, 2016 Share Posted November 30, 2016 I'm trying to programm something to make a character take damage from being wet. However, i can't seem to find any variable that keeps track of the wetness of the player. I found GetSeasonManager():GetPrecipitationRate() in the sanity component file, but it gives wierd results and doesn't seem be what i'm looking for. Link to comment https://forums.kleientertainment.com/forums/topic/72163-variable-containing-the-wetness-of-the-player/ Share on other sites More sharing options...
Ivysaur Posted November 30, 2016 Author Share Posted November 30, 2016 Yikes, i just realised this is in the Don't starve together forum. Sorry, it was meant for regular Don't starve. Link to comment https://forums.kleientertainment.com/forums/topic/72163-variable-containing-the-wetness-of-the-player/#findComment-843508 Share on other sites More sharing options...
Vargling Posted November 30, 2016 Share Posted November 30, 2016 SOUNDS LIKE A JOB FOR L-MAN @ImDaMisterL That's you... Link to comment https://forums.kleientertainment.com/forums/topic/72163-variable-containing-the-wetness-of-the-player/#findComment-843509 Share on other sites More sharing options...
Developer ImDaMisterL Posted November 30, 2016 Developer Share Posted November 30, 2016 Moved Link to comment https://forums.kleientertainment.com/forums/topic/72163-variable-containing-the-wetness-of-the-player/#findComment-843511 Share on other sites More sharing options...
alainmcd Posted November 30, 2016 Share Posted November 30, 2016 @Ivysaur, like WX-78? Use GetPlayer().components.moisture:GetMoisture() from (dlcfolder)/scripts/components/moisture. Check out local function dorainsparks(inst, dt) in (dlcfolder)/scripts/prefabs/wx78.lua and function Sanity:GetMoistureDelta() in (dlcfolder)/scripts/components/sanity for examples. Link to comment https://forums.kleientertainment.com/forums/topic/72163-variable-containing-the-wetness-of-the-player/#findComment-843521 Share on other sites More sharing options...
Ivysaur Posted November 30, 2016 Author Share Posted November 30, 2016 23 minutes ago, alainmcd said: @Ivysaur, like WX-78? Use GetPlayer().components.moisture:GetMoisture() from (dlcfolder)/scripts/components/moisture. Check out local function dorainsparks(inst, dt) in (dlcfolder)/scripts/prefabs/wx78.lua and function Sanity:GetMoistureDelta() in (dlcfolder)/scripts/components/sanity for examples. Alright, components.moisture:GetMoisture() seems to be working just fine. Thanks. Link to comment https://forums.kleientertainment.com/forums/topic/72163-variable-containing-the-wetness-of-the-player/#findComment-843532 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