Question from a developer:
How would I go about implementing resource timers for things like a hunger or thirst bar? Or for a value that decreases over time?
Question from a developer:
How would I go about implementing resource timers for things like a hunger or thirst bar? Or for a value that decreases over time?
The simplest way of doing this would be by using a regenerating currency. Just consider that the max recharge level is your "empty". So, using Fallout as the example, your hunger and thirst raise as time passes. You could do exactly that by setting up a regenerating virtual currency which increases at the rate you want hunger and thirst to increase.
The same is true for a value that decreases over time, though you need to think of it the other way around when setting it up (since regenerating currencies increase over time). In other words, set up a maximum recharge value based upon the total amount that the player can have, but then start the player at zero and let the VC charge up. When you show the player their value, you would then reverse it by showing the current player value as the max minus the current value - and so, decreasing over time until it hits zero.
No one has followed this question yet.