Game Development Community

Newbie quesiton regarding basic cursor functions

by Louis Hamou-Lhadj · in General Discussion · 01/15/2005 (10:16 pm) · 4 replies

Hello, I was wondering if anybody could help me out here. Is there any sort of function or command that would retrieve to me the current position of the cursor on the screen? I have been going through Torque and am trying to figure out if I will be able to easily implement an idea where you would have a regular point and shoot FPS but then if you hold down like "ctrl" your view is locked and instead you can use your mouse cursor to move around the screen. I want to find the coordinates of the cursor once the ctrl key is hit, and then I want to find the coordinates of the cursor after the "ctrl" key is let go. [edit: and then the mouse goes back to controlling the view/aim of the player) ]

I am basically trying to experiment with a sort of "gesture" system, by which the user can make different inputs by moving the mouse in a horizontal line, or a diagonal, or even a circle, and depending on how the mouse is moved while the "ctrl" key is held then a different action can be taken.

Ideally I was hoping I could figure out how to do this through TorqueScript. My knowledge of C++ is entirely console base (I have no experience with visual c++ programming) so trying to mess with the engine intimidates me a bit. Of course if this is the only way to implement by idea then I guess I will have to give in. I searched the forums and resources for this but I had a hard time finding what I was looking for. Any help would be greatly appreciated and I thank you in advance for your time.

#1
01/15/2005 (10:30 pm)
I think what ya want is the object selection resource. search on 'object selection' in resources
#2
01/16/2005 (9:29 am)
I have already seen all the "object selection" related files and I guess if someone knowledgeable could offer me a general explanation of the whole mess it would be greatly appreciated. First off, is there a way to implement my idea using script? And if not, why is this the case? I guess I'm trying to get a better understanding of the differences between the camera, the player's "eye," and a Guicursor. I am just having a hard time figuring how I should approach this problem.
#3
01/17/2005 (10:03 am)
So I guess nobody has anythign to say about this..?
#4
01/17/2005 (1:48 pm)
Maybe this forum section would be more helpful.

It sounds like an interesting idea, this "gesture" system. Hope you find what you're looking for.