At the moment i'm working on a simple sword slashing script for a simple fighting game. I want my script to do one swing animation when a player clicks once, that same swing animation along with a second anim for two clicks, and three different anims for three. I was thinking about setting a variable then adding up that variable as the player clicks, so if the script sees something at or above 3, it will load all three animations, and then after a given time the variable will reset to zero. The only problem is that I don't want the animations to play after a lengthy period. I've seen games that implement this perfectly so im just asking for some insight to how i can make this work
SnakeWorl is known for doing this in his games, he actually made a tutorial on how to do it both randomly and controlled I think.
https://youtu.be/O5VwVxXFYeU?list=PL9XdvFXu9ApCzhDaOVUsx2YFthnUuwdGI&t=1109
It should teach you how.