Jump to content

Variable containing the Wetness of the player


Ivysaur

Recommended Posts

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

@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

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

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.

×
  • Create New...