
-----------------------------------
julian3366
Sat May 07, 2011 5:36 pm

Keep cursor inside predefined area, box
-----------------------------------
Hi, I am creating a game with a moving cannon, the angel of cannon is determined with the location of the mouse in a rectangular box below the cannon. There is no other need for the mouse anywhere else in the game. Is there a way to keep the mouse cursor in a certain area?

-----------------------------------
Insectoid
Sat May 07, 2011 6:36 pm

RE:Keep cursor inside predefined area, box
-----------------------------------
Yes, depending on the language you use.

-----------------------------------
julian3366
Mon May 09, 2011 7:17 pm

Re: Keep cursor inside predefined area, box
-----------------------------------
wow... how did I forget to mention the language... I am using Turing 4.1. thanks

-----------------------------------
Tony
Mon May 09, 2011 7:22 pm

RE:Keep cursor inside predefined area, box
-----------------------------------
The short answer is: no.

The long answer involves your operating system's API access.

-----------------------------------
julian3366
Mon May 09, 2011 7:26 pm

Re: Keep cursor inside predefined area, box
-----------------------------------
haha, thanks for the answer. It was worth a try right?

-----------------------------------
Tony
Mon May 09, 2011 7:47 pm

RE:Keep cursor inside predefined area, box
-----------------------------------
Right. Feel free to ask more questions in the Turing Help forum. (You can also follow the Turing Walkthrough to get ahead and try to implement some more advanced features in your game)
