I do something similar in the game I’m working on, where the firing of the projectile is on button release. I’m not at home and can’t post a screenshot of my blueprint, but this is what I do:
Have the following:
- “SpearCharging” Bool (for whether or not you are readying your spear to throw)
- “SpearChargeTime” Float (to store how long we’ve been readying the spear)
- “SpearDelay” Float (how long we want the player to wait before the spear can be thrown)
On event of LeftClick Pressed, set SpearCharging to TRUE and set SpearChargeTime to 0. Off the EventTick, have a branch taking in SpearCharging and if TRUE add the Delta to SpearChargeTime.
On the event of LeftClick Release, simply compare if SpearChargeTime >= SpearDelay. If so, launch spear, if not, don’t.