so basically i play this game and it has some preety decent controls
so
w,a new,s,d (basic movement)
'w' for moving forward
's' for moving backward
'a' for moving left
'd' for moving right
so if u have some game knowledge you can really help me with this code
so when we press "w" and "q" we are supposed to dash forward
"s" and "q' is for back dash
"a" or "d" and "q" is for side dashed
side dashes, front and back dash have cooldowns.
side dash has 3 seconds cooldown
while
front and back dash has 5 secod cooldown
now that all the important stuff are out of the way, we will get into the main stuff.
this code is mainly for what keys i press and after the certain cool down i mentioned earlier
now i basically want 2 overlays
one is for side dash cooldown and
other is for front and back dash cool down
when i do a side dash the 3 second timer should begin and then end thats it.
same with the front and back dash
which is 5 seconds as mentioned earlier
now obviously u cant continuesly dash to the side or front. so the timer should be set in a way that it does not reset unless the cooldown is up and start again when i do the side, front or back dash.
...........................................................................
it would be great if someone explained me the code aswell, cause i also want to learn