I have to disagree with Uhrwerk here: Locking the mouse is perfectly fine and necessary for most games where the mouse is used to handle more than just a menu. However, the mouse should unlock when the engine window loses focus (f.i. by pressing Alt+Tab) or maybe even when the player presses Esc and opens the menu. You can add an option in the options menu of your game where the player can disable the mouse locking, too (that's how Starcraft II does it).

It is easily possible with lite-C to restrict the mouse pointer to the engine window but I fear it's not so easy with C-Script, I assume you have to use a DLL and I don't know if such a DLL exists.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends