why when I press the key for the first time it waits for 0.5 second and then fires?
Because the timer has been not initialized until you press the key and the condition being triggered for the first time.
Start the timer at the beginning of the scene.
Umar wrote:What do I do? what is the solution?
ddabrahim wrote:Start the timer at the beginning of the scene.
The event is actually called Unpause timer. When you Unpause the timer at the beginning, the timer will be initialized at the beginning and start counting. By the time you press the button, the timer will be >= 0.5 and you be able to shoot a bullet immediately at the beginning of the game.