Jump to content

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.

@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.

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...