I'm making a game which runs in real-time and not turn-based. With the help of this community and the S plugin I've managed to finish the guts of a semi-complicated ability system (yay, thanks!) but ran into an issue in putting finishing touches on it. I need to create a cast time for each ability. Each character and NPC can use one ability at a time that takes some pre-set time to use. I was wondering what the most accurate way to implement this would be.
I've read about issues with frame-rate and timers, which I would like to avoid. In addition, I read that using the timer behavior can cause issues when dealing with multiple instances of an object, or something of that nature, and that "Every X" command botches picking.
Not sure what other issues there are, but what would be the best way to implement a cast-time when an ability is used so that:
1. The timer is as accurate as possible since it will be necessary for balancing issues
2. The timer avoids known bugs
3. The timer preserves the real-time nature of the game so that other events can run freely while the timer counts down.
4. The timer works with instances of the same object.
Thanks for your input :)