3 Step charge system

From the top of my head, you can create a Timeline that starts when you press RMB and looks like this:


The Timeline saves the Charge value into a variable, and when you release RMB, you check the value and act accordingly.


The second curve in the timeline can help you drive the charge up visual effect, I believe you would want that. So killing 2 birds with 1 stone.

I have a “mana” system that doesnt work like the typical one, but by infusing mana the abilities become more powerful
and right now ive been trying to figure out how to check if RMB is still being “Held”

I wanted to know how i can make a 3 step charging system? The goal is to use an ability by pressing x button and then RMB to unlock it, but i want to make it so that it checks for every charge if RMB is still being held down

Charges last 2 seconds each, no charge just click RMB, charge 1 hold RMB for 2 seconds and so on until last charge.

lvl 1- 3 charge: 10%, 20% and 33% of the abilities damage is converted to mana, subtrakted from the mana pool, converted to extra damage

Please specify in the comments if there is something you didnt follow :slight_smile:

Thanks, didn’t really think about using a timeline (<- beginner)