Topic category: Help with MCreator software
Good day.
I'm trying to implement a disease and attrition system.
For example, there is a poisoning that a player can get by eating spoilt meat, drinking dirty water, eating uncooked food and so on.
If the player has poisoning, the maximum depletion value is reduced by 20 units and every game day (EXAMPLE!!!) the current depletion value is increased by 0.25 units.
Can be not only game day, but also game hour. The main thing is the periodicity. As long as the disease is not cured, there will be negative effects.
If I've figured out how to make this disease appear with a certain chance for the player, how can I make the exhaustion system work? I don't really understand. I've attached a picture of my attempt to make such a system in a screenshot on Google drive.
I would be very grateful for your help.
Link:
https://drive.google.com/file/d/1OQAfQzWSlnu-SY2d18lA87Tvo6RFrmpM/view?…
For a day, detect every time either the player sleeps or the time is morning.
For an hour, create a variable that increases every game tick. When the variable is divisible by 72000 (20 TPS*60 minutes*60 seconds), an hour of in game time will have elapsed.
*increases by 1 every game tick