I am having trouble with correct setup of a countdown timer.
My current setup without the countdown timer
start get key down (spacebar) event shoot bullets.
this goes to a bool test were a global can shoot bool is tested
events can shoot and stop shooting
can shoot goes to create the bullet
stop shooting goes to state no shooting (nothing in here) go back to start state.
true = create the bullet (it has FSM to move) go back to start state.
False = go to stop shooting
When the player picks up a gem the global can shoot is flipped from false to true.
So gem picked up global value true spacebar pressed you can shoot bullets, bullet created for every spacebar press.
I want to limit the shooting to within a ten second time limit.
You can shoot for ten seconds, when time up no more shooting and reset the timer back to ten seconds.
If you are shooting and pickup another gem add more time to the shooting timer.
The FSM that currently handles the shooting is on the player this object is not a prefab and is always on screen.
I keep running into issues with the timer and the spacebar being pressed.
I attached the screenshot of the current FSM
Could someone please help