question

yanuararistya avatar image
yanuararistya asked

Regenerating virtual currency timer doesn't stop after reaching maximum value

Hi I have a virtual currency for health (HL) with

Initial = 5

Rate = 32 (per 45 minutes)

Max = 5

The value itself doesn't get incremented over the maximum value, however the timer doesn't stop after reaching the max value (SecondsToRecharge doesn't equal 0).

I've tried creating another regenerating VC to test with

Initial = 5

Rate = 1440 (per minute)

Max = 5

and I'm having the same behavior. Is this the expected behavior or am I doing something wrong?

In-Game Economy
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

That fix is now live. In my own testing, I am noticing that it's appearing to return a value one second less than it should sometimes (so, if you've got a recharge rate of 24, instead of saying 3600 seconds to the next recharge, you sometimes get 3599), but that's because we're not rounding up, and the actual value it's trying to state is a few milliseconds less than the full time period.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Yes, there's a known issue with virtual currency regeneration, in that the timer continues to cycle once the max is reached. The max will not be exceeded via regeneration, but the time to the next regeneration when the balance drops from the max is therefore going to vary. We have an open bug on this, and we'll be fixing it in an upcoming sprint.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.