I've searched the forums and I see a lot of people asking for this, but no final solutions.
I am looking at using a virtual currency that adds one energy per x minutes. As users level up this max bar would get larger so instead of capping out at 5 energy, they might have 10, 20, 30, etc. Additionally I'd like to allow them items they can buy or temporary buffs that let them increase this cap. Basically a script that can return what the max energy bar is for that user, rather than a single global variable for that currency.
Is there any way to either set this, or intercept the regeneration timer script to run my own validation to decide if they get the +1 when the timer runs out? If not a variable cap, can the cab be unlimited and check code before incrementing?
Thanks.
-Chuck