Problems with Loops [Urgent]

Hi all.
First, sorry for this dumb question, but i’m a beginner and I need help very quickly.
So, in fact, i try to do a script who send bullet.

Actually, i try to do with this scipt some sorte of Loop, but, i didn’t find how can i do that, and if i remplace the “IF” at the line 5 by a “WHILE”, the programme cannot work.

Please, how can i do that ? I’ve got limited time.

PS : If there is already an answer to that, thanks to give the url. I didn’t find this.

Your script looks almost right. What you missed is that Input.GetButtonDown should in fact be Input.GetButton.

GetButton is the “looping” version that takes input over several frames instead of on the fired frame.

The Update function is called for each execution. So if you use while function of no limit inside the update function , then the update function is never ended and never returned to the caller function.Thus the program will be locked in the while loop.

thank you very much.
Instead, it is possible to hide the mouse cursor in the game ?

Check these…
http://forum.unity3d.com/threads/47816-how-to-hide-a-mouse-cursor-at-the-game

http://answers.unity3d.com/questions/26970/how-to-hide-the-cursor

Thank you.
Do you know a tutorial about the IA ? i don’t know how make a ennemy follow my player.

You mean “AI”,… There are degree courses on it, It’s a wide area… there are tutorials on the internet… use google…

hm.
Ok.
Thank you and sorry for the disagreaments.