the first 2 minutes is straight up amazing, i love how you do tutorials, no bs, straight up telling exactly what you are doing and why you are doing it, genius!
Typically the best approach is to have a bool variable on your vehicle controller script called something like "canPlayerMove" At the start of the game, this value will be set to false, when you check for player input, if canPlayerMove is set to false, then ignore input so the car doesn't move. When the timer ends, just set canPlayerMove to true and your player can move as normal. Hope that helps!
Just discovered you today. Mentioned Code Monkey on Twitch to someone, and they said they watch you and "etc." as well. Congrats on the new subscriber!
GameController is a custom class that I've created that holds some general logic about setting things up for my game. Feel free to check out the full tutorial for the context of creating a GameController class - ruclips.net/video/BbnQjV_udF8/видео.html
How can you make this countdown timer work while the game does not start/ is paused until after the "GO!" goes away? My counter works OK, but the game is going on in the background anyway.
You can use yield return WaitForSecondsRealtime to continue the countdown timer if the game is paused - with TimeScale set to 0. If you want your game to continue running in the background however, you need to go to your Player Settings and enable "Run in Background" Hope that helps!
i need help with a problem at the part where you used your gamecontroller.instance.BeginGame(); i get a error gamecontroller does not contain a definition for 'instance' please help
That is because I have my GameController setup as a Singleton. A singleton is a design pattern you can use to essentially access objects from anywhere without explicit references to them. Look up some other videos or articles on Singletons in Unity to get a better understanding of how they work. Hope that helps!
Thanks a lot bro, this vid make it easy for me to implement a countdown timer on my lil VR game.. And I also learned what in tarnation them coroutines are... 😂👌🏻
That's awesome! Funny, the first time implemented a countdown timer was in a VR game - it was on Google Cardboard though 😂 Yeah coroutines are awesome, I use them all the time! Best of luck on your VR game 👊👊
This countdown works perfectly fine in Unity Editor, but when i build the game (export it into .exe) and run it, the Start() method doesn't even run. How can i fix this? (i made it for a racing game with a main menu but i don't think that makes a lot of difference)
Hello - good question! You can use C# string formatting to display the underlying float time value in hours, minutes, seconds, etc. - first you need to make the float value into a TimeSpan type, then you can easily display it how you want it. In the "in-game timer" video I made, I show you how to do just that, hope that helps! ruclips.net/video/qc7J0iei3BU/видео.html
I keep on getting the error "Assets\START.cs(12,24): error CS1503: Argument 1: cannot convert from 'System.Collections.IEnumerable' to 'string'" how do I fix it?
Can i please know how did you make your gamecontroller.instance.begun(); function Bro also can you tell me what your 4 hour game tutorial is i want to know i didnt find it in your channel
I setup the GameController as a "Singleton." To do this, at the top of the GameController class I defined: public static GameController instance; Then in the Awake() function I set instance = this; Hope that helps! And here is the video for my Twin-Stick Shooter tutorial: ruclips.net/video/BbnQjV_udF8/видео.html
New subscriber here, recently seen this video. just a question i'm making a game similar to googles dino and i want to put timer before the game starts. the problem is that it seems like the game keeps on tunning despite the timer any way where i could sync the two?
What isn't working? Are you getting some kind of error message? In this video, I have the GameManager setup as a singleton so I can call functions on it directly from other scripts. Your "BeginGame" function for your project will likely be different than how I have mine setup, but using a singleton to access it could still work just fine.
@@TurboMakesGames i have the same error, becouse in your gamecontroller you probably crate something call BeginGame, some class, idk, so we dont know what code we need to put in gamecontroller script for the countdown script part work without errors, in my code I found a way to dont make an error so that as I don't know what you had written in the begingame part of the gamecontroller script my character can move around while the countdown happens.
Im trying to use this for a flappy bird style game. in the begining, but it only works for the first start and when i press play again it does not show. The countdown Time is then set to 0. How would i go about setting it back to 3 everytime the function runs? (if you see what i mean :) )
Good question - in that case, it might make sense to have a function called like ResetTimer() that resets the countdown time variable to 3 then calls the start coroutine method. Hope that helps!
Cool video, but for my project i want the game to be on a pause mode during the count down, does this work for having all the gameOject to be in a pause mode so that they dont move or spawn?
Yes, if you wanted to do this, you would set Time.TimeScale to 0 at the beginning of your game (to effectively pause your game) then use WaitForSecondsRealtime in your coroutine (this ignores any time scaling). Once your timer hirs zero, then set Time.TimeScale back to 1. Hope that helps, let me know if you have any other questions!
That is something that you would create on your own and add your own logic into. You don't necessarily need to run this on a GameController - you could use your PlayerController or something else to trigger the start of your game. Hope that helps!
Yes, if you wanted to do this, you would set Time.TimeScale to 0 at the beginning of your game (to effectively pause your game) then use WaitForSecondsRealtime in your coroutine (this ignores any time scaling). Once your timer hits zero, then set Time.TimeScale back to 1. Hope that helps, let me know if you have any other questions!
There are many ways to do this, but one approach would be to have a bool variable to determine if the player can enter input. This value can be set to false when the game loads then set to true once the timer ends and the game begins. You can see how I do this in the full game tutorial here: ruclips.net/video/BbnQjV_udF8/видео.html
Great question. This is why it makes sense to create your own input management class. Then you only have one central location that handles all the input in your game. Then it's as simple as setting a bool variable for canTakeInput. If that value is false, then tell your code not to process the input. Once the timer ends, flip that variable to true and process your input as normal.
At 9:08 in the video, I disable the GameObject of the text field to make the countdown text disappear. To make an image disappear, you would just need a reference to the GameObject holding the image then disable it in the coroutine at this same point, similar to how I disable the text GameObject.
Can I do that but whenever I press a button I have a pause menu when I press the resume button I want it to count down for 5seconds and then return the game to time.deltatime 1f
Yes - and I assume you mean time.timescale equal to 1f? Because time.deltatime = 1f means your game would be running at 1 frame per second. But yes, you could set the timescale to 0 and pause your game then when you want to play your countdown timer, you will use WaitForSecondsRealtime() to count the timer down, once it reaches 0, then you can set the timescale back to 1. Hope that helps!
Yow, thanks for the tutorial. i need some help here. I am able to move my character while the countdown is running. PS..I don't have a gamecontroller script so I wasn't able to refer to the begingame(); . I would appreciate your help.
So basically, the way I accomplished this is I had a bool variable that would keep track of whether or not the player can move. When I check for input in my game I check to see if the player can move or not. If it cannot move (i.e. at the start of the game) then I just ignore the input. In my GameController.BeginGame() function then I set that value of canMove to true so that the player is able to move freely. Hope that helps!
The start game logic basically just sets up objects and values for the game to start. Was there something specific in your game that you were trying to implement?
The .Instance is how I setup the GameController as a singleton. Basically it provides a way that I can easily access the single GameController script from any other script in my code. You define a singleton like this in your GameController class: public static GameController Instance; Then set it inside the Awake() function like this: private void Awake(){ Instance = this; } Then from any other script you can just call: GameController.Instance.AnyMethodOnGameController(); Hope that helps!
This is awesome! Thank you for the video :) I added Time.timeScale = 0; to freeze and added unscale Time.timeScale = 1; it working but I have one problem. I have coutdownDisplay.text = "Go!"; outside of the while loop. The Go text won't display after the 3, 2, and 1 countdown is fired. However, it will display if I don't have the line of countdownDisplay.gameObject.SetActive(false); How can I implement Go text with using disabling the countdownDisplay at the end?
Make sure you have the line "yield return new WaitForSeconds(1f);" after you set the text to "GO!" and before you disable the GameObject. That will make the Go text show on screen for 1 second
Pretty much the same way I learn anything else... I have a problem then I look for the best solution based off of what I already know then I do some research to fill in the gaps in my knowledge or figure out what other people have done to solve the same problem. Then the most important part is actually implementing the solution to figure out how well it actually works.
Glad you found the countdown timer useful. In the full game tutorial I took this from, I go over how to implement this. In general you just need to have a bool variable on your input controller to track if the player can or cannot move. At the beginning of the game, you'll set this to false and when the countdown completes, set it to true. Then whenever you check for input, check the bool variable first - if it is false, just go ahead and ignore the input - if it's true, then process the input as normal. Hope that helps!
Thanks! There are a couple ways you can do this - one easy way would be to just block player input before your game says "GO!" another way you could is set Time.TimeScale to 0 which will freeze everything in your game. Just make sure to use Unscaled Time for your countdown timer so it still counts down properly. Hope that helps!
@@TurboMakesGames I have the same issue and I can't find the way to fix it. I can't find the way to freeze everything except the countdown. It either freezes everything or nothing. Thanks for the video, it has been very useful anyway :D
@@bielalti805 Yes, that is why you need to use unscaled time for the countdown, because unscaled time isn't affected when you set the time scale to 0 to freeze everything else. The way you do this in a coroutine is to do a yield return new WaitForSecondsRealtime(timeInSeconds) Hope that helps!
Great question. The StartCoroutine() method returns a Coroutine type, so you can store that as a private field. If you create a Restart() method you can simply stop the coroutine you stored then start the coroutine again and store the returned value back into that field so you can reference it should you need to restart again. Hope that makes sense!
Ohh okay I see. The GameController class is a custom class that I made that has some logic to start some things in the game. That part isn't tied into the timer itself so you can just remove it and replace it with whatever start game logic you have.
@@bartiflette4199 You only need that if you want to setup some things in your game when the timer reaches 0. In my game I have the GameController class setup as a "singleton" meaning I can access its public functions from anywhere by calling GameController.instance.AnyPublicFunction() Another way to do this would be to have a public GameController field called gameController, then you could drag in your GameController object in the Unity scene, allowing you to call gameController.AnyPublicFunction() Hope that clears things up a bit, let me know if you still have any questions.
It would be fairly easy to extend the functionality of something like this to enable a lose game state as you described. Once the timer expires, instead of calling a begin game method, maybe you call and end game method or event to do all your end game stuff like pausing movement and showing a Game Over UI.
It would be really similar to do this, you would just need to start a new coroutine for each button cooldown. You could then use your internal countdown value to affect the UI so the player can see when the cooldown expires.
the first 2 minutes is straight up amazing, i love how you do tutorials, no bs, straight up telling exactly what you are doing and why you are doing it, genius!
Thanks for the positive feedback here! I always try to be respectful of my viewers' time, so good to know you like this format 😀
Great amount of detail & clear concise instructions without any unnecessary faff. Keep up the great videos!
Much appreciated, thanks for the positive feedback!
It's very clear and comprehensive. Thanks for the tutorial
So glad to hear this, all the best!
life is beautiful when shared, thank you
That's a nice phrase, thanks for stopping by!
hi,
i have done all of the steps but at the end my car is still moving while the counter is going,can you please help
Typically the best approach is to have a bool variable on your vehicle controller script called something like "canPlayerMove"
At the start of the game, this value will be set to false, when you check for player input, if canPlayerMove is set to false, then ignore input so the car doesn't move.
When the timer ends, just set canPlayerMove to true and your player can move as normal. Hope that helps!
Just discovered you today. Mentioned Code Monkey on Twitch to someone, and they said they watch you and "etc." as well.
Congrats on the new subscriber!
Haha right on, thanks for stopping by! Hope you enjoy 😊
You're doing God's work bro
Glad to help 😀
Nice one! It helps a lot for my endless runner project, keep it up!
Great to hear! Seems like this countdown timer would fit really nicely in an endless runner 😊
Very good tutorial. I like how you explain every part with details. :)
Glad to hear it helped you out!
hey bro it is showing me that gamecontroller is not defined in current context why unity cannot identify gamecontroller keyword
Please Help!
same to you
GameController is a custom class that I've created that holds some general logic about setting things up for my game. Feel free to check out the full tutorial for the context of creating a GameController class - ruclips.net/video/BbnQjV_udF8/видео.html
though it's a simple tutorial but i like your teaching technique, go ahead brother
Appreciate the feedback 😊
How can you make this countdown timer work while the game does not start/ is paused until after the "GO!" goes away? My counter works OK, but the game is going on in the background anyway.
You can use yield return WaitForSecondsRealtime to continue the countdown timer if the game is paused - with TimeScale set to 0. If you want your game to continue running in the background however, you need to go to your Player Settings and enable "Run in Background"
Hope that helps!
i need help with a problem at the part where you used your gamecontroller.instance.BeginGame(); i get a error gamecontroller does not contain a definition for 'instance' please help
That is because I have my GameController setup as a Singleton. A singleton is a design pattern you can use to essentially access objects from anywhere without explicit references to them. Look up some other videos or articles on Singletons in Unity to get a better understanding of how they work. Hope that helps!
@@TurboMakesGames ok thanks bro
Thanks so much for the tutorial!!
Absolutely, glad it helped!!
awesome! Very helpful
Thanks for the tutorial. It helped me a lot!
So glad to hear this!
Great work! Continue like this bro :)
Thanks, glad you liked it! Lots more on the way 😀
Thanks a lot bro, this vid make it easy for me to implement a countdown timer on my lil VR game.. And I also learned what in tarnation them coroutines are... 😂👌🏻
That's awesome! Funny, the first time implemented a countdown timer was in a VR game - it was on Google Cardboard though 😂
Yeah coroutines are awesome, I use them all the time! Best of luck on your VR game 👊👊
Damn son, thanks my man 12am - 7am
I would probably do it by adding stuff
😁😁😁
This video should have more views! Greate job!
Appreciate the kind words! Glad you found it helpful 😊
Thank you so much!
Sure thing, glad it helped!
then how do i make some gameobject can move foward in 3 seconds?
'WaypointCOntroller' does not contain a definition for 'instance'. please help me to resolve this
Great video, helped me alot!
Awesome, great to hear!
This countdown works perfectly fine in Unity Editor, but when i build the game (export it into .exe) and run it, the Start() method doesn't even run. How can i fix this? (i made it for a racing game with a main menu but i don't think that makes a lot of difference)
How would I get the countdown to show minutes and seconds? Please help 🙏
Hello - good question! You can use C# string formatting to display the underlying float time value in hours, minutes, seconds, etc. - first you need to make the float value into a TimeSpan type, then you can easily display it how you want it. In the "in-game timer" video I made, I show you how to do just that, hope that helps!
ruclips.net/video/qc7J0iei3BU/видео.html
I keep on getting the error "Assets\START.cs(12,24): error CS1503: Argument 1: cannot convert from 'System.Collections.IEnumerable' to 'string'" how do I fix it?
Good job, I was intended many times but it didn't work, You saved me! Thanks
Glad I could help 😊
Thank you very much for this tutorial has really helped me alot .
Appreciate it, great to hear 😀
@@TurboMakesGames Yeah Infact Im almost done with my project .
brilliant code and explanation thank you very much!
Thanks! Glad you found this helpful 😀
Can i please know how did you make your gamecontroller.instance.begun(); function
Bro also can you tell me what your 4 hour game tutorial is i want to know i didnt find it in your channel
I setup the GameController as a "Singleton." To do this, at the top of the GameController class I defined:
public static GameController instance;
Then in the Awake() function I set
instance = this;
Hope that helps!
And here is the video for my Twin-Stick Shooter tutorial: ruclips.net/video/BbnQjV_udF8/видео.html
@@TurboMakesGames thanks man
Thanks!
Absolutely! Glad it helped
New subscriber here, recently seen this video. just a question i'm making a game similar to googles dino and i want to put timer before the game starts. the problem is that it seems like the game keeps on tunning despite the timer any way where i could sync the two?
Perfect! Thanks!
Sure thing!!
I cannot do Begin Function. I have a mistake. Please Can u help me?
What isn't working? Are you getting some kind of error message? In this video, I have the GameManager setup as a singleton so I can call functions on it directly from other scripts. Your "BeginGame" function for your project will likely be different than how I have mine setup, but using a singleton to access it could still work just fine.
@@TurboMakesGames i have the same error, becouse in your gamecontroller you probably crate something call BeginGame, some class, idk, so we dont know what code we need to put in gamecontroller script for the countdown script part work without errors, in my code I found a way to dont make an error so that as I don't know what you had written in the begingame part of the gamecontroller script my character can move around while the countdown happens.
when i ask for visual studio tips he creates this code in gamecontroller : internal void BeginGame()
{
throw new NotImplementedException();
}
for some reason it displays only 3 and 1, not 2. I tried it with 6 and it went 6 4 2 1.
Im trying to use this for a flappy bird style game. in the begining, but it only works for the first start and when i press play again it does not show. The countdown Time is then set to 0. How would i go about setting it back to 3 everytime the function runs? (if you see what i mean :) )
Good question - in that case, it might make sense to have a function called like ResetTimer() that resets the countdown time variable to 3 then calls the start coroutine method. Hope that helps!
Cool video, but for my project i want the game to be on a pause mode during the count down, does this work for having all the gameOject to be in a pause mode so that they dont move or spawn?
Yes, if you wanted to do this, you would set Time.TimeScale to 0 at the beginning of your game (to effectively pause your game) then use WaitForSecondsRealtime in your coroutine (this ignores any time scaling). Once your timer hirs zero, then set Time.TimeScale back to 1. Hope that helps, let me know if you have any other questions!
Where can i get GameController Script??
That is something that you would create on your own and add your own logic into. You don't necessarily need to run this on a GameController - you could use your PlayerController or something else to trigger the start of your game. Hope that helps!
Can you tell us hot to freeze the game while the animation loads instead of a start game?
Yes, if you wanted to do this, you would set Time.TimeScale to 0 at the beginning of your game (to effectively pause your game) then use WaitForSecondsRealtime in your coroutine (this ignores any time scaling). Once your timer hits zero, then set Time.TimeScale back to 1. Hope that helps, let me know if you have any other questions!
@@TurboMakesGames Hi, Can you please show us the code or how to do this?
When I click on play, the game and the countdown start at the same time. In your video the countdown starts first and then the game.
There are many ways to do this, but one approach would be to have a bool variable to determine if the player can enter input. This value can be set to false when the game loads then set to true once the timer ends and the game begins. You can see how I do this in the full game tutorial here: ruclips.net/video/BbnQjV_udF8/видео.html
Thanks.
when I add GameController it gives me error :/
how do you disable all the controls until the timer ends
Great question. This is why it makes sense to create your own input management class. Then you only have one central location that handles all the input in your game. Then it's as simple as setting a bool variable for canTakeInput. If that value is false, then tell your code not to process the input. Once the timer ends, flip that variable to true and process your input as normal.
@@TurboMakesGames Alright, Thanks
Thanks for the video. How can I make an Image disappear after the countdown time has ended?
At 9:08 in the video, I disable the GameObject of the text field to make the countdown text disappear. To make an image disappear, you would just need a reference to the GameObject holding the image then disable it in the coroutine at this same point, similar to how I disable the text GameObject.
Can I do that but whenever I press a button I have a pause menu when I press the resume button I want it to count down for 5seconds and then return the game to time.deltatime 1f
Yes - and I assume you mean time.timescale equal to 1f? Because time.deltatime = 1f means your game would be running at 1 frame per second. But yes, you could set the timescale to 0 and pause your game then when you want to play your countdown timer, you will use WaitForSecondsRealtime() to count the timer down, once it reaches 0, then you can set the timescale back to 1. Hope that helps!
@@TurboMakesGames thanks alot that helped me
Yow, thanks for the tutorial. i need some help here.
I am able to move my character while the countdown is running. PS..I don't have a gamecontroller script so I wasn't able to refer to the begingame(); . I would appreciate your help.
So basically, the way I accomplished this is I had a bool variable that would keep track of whether or not the player can move. When I check for input in my game I check to see if the player can move or not. If it cannot move (i.e. at the start of the game) then I just ignore the input. In my GameController.BeginGame() function then I set that value of canMove to true so that the player is able to move freely. Hope that helps!
@@TurboMakesGames thanks
@@TurboMakesGames Thanks ❤
How did you make your Star game logic
The start game logic basically just sets up objects and values for the game to start. Was there something specific in your game that you were trying to implement?
How do i make my game run after the timer is finished
Hey for some reason the countDown is going down faster then yours how would i fix
Are you setting the time scale anywhere in your project? If so, you can still access the "unscaled time" and run your countdown timer off that.
"GameController does not exist in the current context"
"not all code paths return a value"
I have a problem with a word .instance.
The .Instance is how I setup the GameController as a singleton. Basically it provides a way that I can easily access the single GameController script from any other script in my code. You define a singleton like this in your GameController class:
public static GameController Instance;
Then set it inside the Awake() function like this:
private void Awake(){
Instance = this;
}
Then from any other script you can just call:
GameController.Instance.AnyMethodOnGameController();
Hope that helps!
ThankYou
No problem!
This is awesome! Thank you for the video :) I added Time.timeScale = 0; to freeze and added unscale Time.timeScale = 1; it working but I have one problem. I have coutdownDisplay.text = "Go!"; outside of the while loop. The Go text won't display after the 3, 2, and 1 countdown is fired. However, it will display if I don't have the line of countdownDisplay.gameObject.SetActive(false); How can I implement Go text with using disabling the countdownDisplay at the end?
Make sure you have the line "yield return new WaitForSeconds(1f);" after you set the text to "GO!" and before you disable the GameObject. That will make the Go text show on screen for 1 second
@@TurboMakesGames Thank you so much! That's I was missing!
From where did u learn all this
Pretty much the same way I learn anything else... I have a problem then I look for the best solution based off of what I already know then I do some research to fill in the gaps in my knowledge or figure out what other people have done to solve the same problem. Then the most important part is actually implementing the solution to figure out how well it actually works.
Thanks Alot
Sure thing, glad it helped you out!
What was explained was well explained but half the point of a countdown timer is to deactivate player controls, which was not explained.
Glad you found the countdown timer useful. In the full game tutorial I took this from, I go over how to implement this. In general you just need to have a bool variable on your input controller to track if the player can or cannot move. At the beginning of the game, you'll set this to false and when the countdown completes, set it to true. Then whenever you check for input, check the bool variable first - if it is false, just go ahead and ignore the input - if it's true, then process the input as normal. Hope that helps!
@@TurboMakesGames Thanks
hey...Great video.. i like the way u explain things.. i have one issue , when my counter starts i also can play my game even if its counting
Thanks! There are a couple ways you can do this - one easy way would be to just block player input before your game says "GO!" another way you could is set Time.TimeScale to 0 which will freeze everything in your game. Just make sure to use Unscaled Time for your countdown timer so it still counts down properly. Hope that helps!
@@TurboMakesGames I have the same issue and I can't find the way to fix it. I can't find the way to freeze everything except the countdown. It either freezes everything or nothing. Thanks for the video, it has been very useful anyway :D
@@bielalti805 Yes, that is why you need to use unscaled time for the countdown, because unscaled time isn't affected when you set the time scale to 0 to freeze everything else. The way you do this in a coroutine is to do a yield return new WaitForSecondsRealtime(timeInSeconds)
Hope that helps!
what about real count down date with DateTime.UtcNow
Should be able to work, give it a shot!
How can you restart it with a button ?
Great question. The StartCoroutine() method returns a Coroutine type, so you can store that as a private field. If you create a Restart() method you can simply stop the coroutine you stored then start the coroutine again and store the returned value back into that field so you can reference it should you need to restart again. Hope that makes sense!
wow it nice code but code not counting if i use reset level how to fix this?
plz help
Thanks
No problem!
I don't have game controller, could someone help me ?
You don't need a game controller for this, the countdown timer is separate from any input logic 😊
@@TurboMakesGames yeah but for the gamecontroller.instance.BeginGame();, they say no object find for this
Ohh okay I see. The GameController class is a custom class that I made that has some logic to start some things in the game. That part isn't tied into the timer itself so you can just remove it and replace it with whatever start game logic you have.
@@TurboMakesGames yeah but I must put something, bc I can't juste write Instance.BeginGame(); my question is idk what put before that
@@bartiflette4199 You only need that if you want to setup some things in your game when the timer reaches 0. In my game I have the GameController class setup as a "singleton" meaning I can access its public functions from anywhere by calling GameController.instance.AnyPublicFunction()
Another way to do this would be to have a public GameController field called gameController, then you could drag in your GameController object in the Unity scene, allowing you to call gameController.AnyPublicFunction()
Hope that clears things up a bit, let me know if you still have any questions.
you are my hero i will give free dollar B)
😁😁 Glad you found it helpful
public Text dont work i think
How is it not working for you?
Damn all those tutorials and no timer out trigger lose game can u make a tutorial on that
It would be fairly easy to extend the functionality of something like this to enable a lose game state as you described. Once the timer expires, instead of calling a begin game method, maybe you call and end game method or event to do all your end game stuff like pausing movement and showing a Game Over UI.
@@TurboMakesGames thanks
the game isnt pausing
Are you setting Time.TimeScale to 0f? That should pause the game for you
no one make countodwn timer like in moba ,,( the buttons ) , sofar i couldnot find tutorials
It would be really similar to do this, you would just need to start a new coroutine for each button cooldown. You could then use your internal countdown value to affect the UI so the player can see when the cooldown expires.
it only works one time
Yes, but you should be able to add in a reset function and reset it automatically or whenever you need to in your game.
Send me please code.
You can download all project files, code included, through the link in the description of the video
TBH its useless!!!
Sorry you didn't find this video helpful. Feel free to let me know what kinds of things you want to learn about game development!