Jump to content

I want get my character data that hunger and Sanity in game


Recommended Posts

Wolfgang is listening to the event "hungerdelta" in his onbecamehuman function.

You can listen to the events "hungerdelta" and "sanitydelta" to change your stats.

These are the events that are pushed, so if you listen to them, you will get the following values in the data argument:

--Hunger
self.inst:PushEvent("hungerdelta", { oldpercent = old / self.max, newpercent = self.current / self.max, overtime = overtime, delta = self.current-old })

--Sanity
self.inst:PushEvent("sanitydelta", { oldpercent = self._oldpercent, newpercent = self:GetPercent(), overtime = overtime, sanitymode = self.mode })

 

  • Like 1
Link to comment
Share on other sites

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
 Share

×
  • Create New...