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 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 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 Share on other sites More sharing options...
Developer ImDaMisterL Posted November 30, 2016 Developer Share Posted November 30, 2016 Moved Link to comment 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 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 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.