qwpqwp Posted October 15, 2021 Share Posted October 15, 2021 i want make abillity that change stat by hunger and sanity. But i don't know how get hunger and sanity in game. Already refer to wolfgang.lua but no income Link to comment Share on other sites More sharing options...
Monti18 Posted October 18, 2021 Share Posted October 18, 2021 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 }) 1 Link to comment 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