Hi, I have attached a screenshot that contains a sort of dash ability that I am using in my current game. At the moment the dash ability is spammable and I have been unable to find a solution to this. I would like to have a 1-2 second cooldown or wait time in between dashes. Any help is appreciated.
Ok here I made a capx. file for you its simple
http://www29.zippyshare.com/v/NJHVaJYy/file.html
Controls= press spacebar to dash forward. Then it takes 4 seconds before you can dash again. Any questions just ask.
Develop games in your browser. Powerful, performant & highly capable.
Thanks so much. I am away from my PC at the moment but I will let you know one way or another when I get back.
Thats the code its real simple, as simple as I could make it. Don't worry have fun making games !!
When global variable dasher is 1 , then you can dash. When you press button dasher becomes 0 , then you can't dash. You can use this simple concept to solve a lot of problems too. The else statement cuts down coding by a lot.
Hey, thanks for the examples. The dash mechanic I am using is a little different. Was wondering if there was a way to have a cooldown for the way I have it set up here: http://www94.zippyshare.com/v/yFV8moKL/file.html
Update: I got it figured out now thanks for your help.