forums

TNT Basic Forums > Feedback
Hot request: set mouse x
< Last Thread     Next Thread >
Author
Thread        Post A Reply

02-07-2003 01:48

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

I need very much something to change the mouse x and y coordinates. I found it is often usefull and some times absolutely necessary.
A simple example (but I have also other, more complex situations for the game I' m trying to make):

You want some sprite to rotate clockwise when the user goes up with the mouse, and anticlockwise if he goes down, simply proportionally to the mouse movement and immediate (dont wanna use the input "mouse y control", has strange beheaviour). so an idea was to put simply

set sprite rotation spritenum, mouse y*3

but when the mouse y=0, of course the mouse does not go up any more, so the sprite does not turn.
I did not find a way through it.

So, in brief, we need a "set sprite x/y" command (hoping it is possible to code).

02-07-2003 14:35

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Yeah, good idea. I'd like this function or OS X compatible inputs.

02-08-2003 23:10

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

I presume this function is or very easy to code or impossible...

Which one is it, Mark?

02-11-2003 11:12

Posted by:
John Treece-Birch

Click Here to Email John Treece-Birch   Find more posts by John Treece-Birch

Moving the mouse

I assume you're asking for a function that lets you set the mouse's x and y position. I *think* it's possible so I'll look into implementing it.

Thanks,
John

02-11-2003 13:47

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

Yeah, set mouse x and y position.
Thank you, this function is really important 'cause some times there is no way around it.

03-03-2003 12:56

Posted by:
John Treece-Birch

Click Here to Email John Treece-Birch   Find more posts by John Treece-Birch

Bad News

I've got some bad news I'm afraid.....

It is starting to look like setting the mouse's position is not possible on the mac (if anyone knows otherwise then please tell me). So therefore the Set Mouse X/Set Mouse Y commands are not possible either.

It looks like the only solution to this problem is for us to implement Input Sprocket support in OS X.

Thanks,
John

03-07-2003 13:06

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

hmmmm... terrible... :-(

Input sprocket 's (at least the one on os 9) mouse' s x-axis and y-axis detector is not good for what I need...
tough luck...

03-24-2003 08:17

Posted by:
mark_667

Location:
England

Click Here to Email mark_667   Find more posts by mark_667

RE: the set mouse x and y (dream)commands.

If you done:

int x=mousex
int y=mousey

sprite1,x,y,128

and then moved the sprite to somewhere else on screen would the mouse move with it or just the sprite? This could be a simple way of doing it an a game, even if it isn't what everyone is looking for.

03-24-2003 22:02

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

<QUOTE>

03-03-2003 13:56

Posted by:
John Treece-Birch


Bad News

I've got some bad news I'm afraid.....

It is starting to look like setting the mouse's position is not possible on the mac (if anyone knows otherwise then please tell me). So therefore the Set Mouse X/Set Mouse Y commands are not possible either.

It looks like the only solution to this problem is for us to implement Input Sprocket support in OS X.

Thanks,
John

</QUOTE>

It IS possible. Due to some incompatibility, one of my games was unable to hide the cursor, and it WAS warping around.

04-26-2003 21:15

Posted by:
mark_667

Location:
England

Click Here to Email mark_667   Find more posts by mark_667

Hi,
In the above postings, you said that the functions set mouse x and y aren't possible on the Mac. I don't know if you already know this, but an application included with my OS 9. system software called Graphics Calculator can do it. I realised it when selecting the 'view full demo' option. Their web site is www.PacificT.com Maybe if you ask nicely they'll show you how they done it and it can be included in the next TNT release.

Hope this helps,
mark_667

04-26-2003 21:30

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

I think you mean "Graphing Calculator". I tried it, you're right. It shows how you can click and drag something, and if you interrupt the demo, your cursor stays where it was when you interrupted it.

04-27-2003 00:43

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

hey, it' s true! Nicely spotted ;-)

04-27-2003 23:21

Posted by:
Mark Tully

Location:
TNT HQ, England

Click Here to Email Mark Tully   Find more posts by Mark Tully

Update

We think it is possible, but you have to do it in a different way on OS X from OS 9, we'll try and get it in a future version.

Cheers,

Mark

04-28-2003 01:25

Posted by:
DanLurie

Location:
Earth>USA>New Jersey>Clifton>My Chair

Click Here to Email DanLurie   Find more posts by DanLurie

I'd like a command to set the position and velocity of the user's hand, i.e.,
move hand right, forehead, hard

04-28-2003 02:53

Posted by:
puffin

Click Here to Email puffin   Find more posts by puffin

mouse velocity?

the user decides the velocity of the mouse. if macs are the same as windows then the mouse refresh rate is dependent on the processors hz, so the only way that a programmer could affect the mouse velocity would be to change the processor the number of modulations per second that the processor runs at. i'm no expert but i don't think that's possible.

04-28-2003 15:19

Posted by:
Machi

Click Here to Email Machi   Find more posts by Machi

All of the Apple documentation refers to the mouse (or cursor) position being set by "low level handlers". This has nothing to do with the CPU speed and everything to do with what Apple does and doesn't want you to do with your programs.

There are clearly programs out there (at least prior to OSX) that have managed to do this. The ability of a program to "snap" the cursor to a default button in a dialog is an example. Applescript is the obvious place to start looking for access to this sort of function, but I have spent a reasonable amount of time looking there and elsewhere and haven't found a way to do it. It is also possible that this functionality was previously available, and like a number of old toolbox functions has now been retired.

I'll keep looking, but I don't think that this is one that the TNT guys are going to be able to fix for us in the short term.

04-28-2003 22:38

Posted by:
someone

Location:
Quebec ( Canada )

Click Here to Email someone   Find more posts by someone

Well, could the TNT team then work on an input thing? You know there are LOTS of osX games, and these games use inputs, so why wouldn't TNT be able to use them?

04-29-2003 15:44

Posted by:
puffin

Click Here to Email puffin   Find more posts by puffin

it doesn't matter what controls the mouse, the user still controls the velocity of it. that's the nature of the mouse, you know what i mean? the user can move as fast or as slow as the user wants. mac's may work differently then pc's in terms of when they evaluate the mouse position, but it still doesn't change the users ability to go fast or slow.

04-29-2003 17:24

Posted by:
matteo

Location:
Venice, ITALY!

Click Here to Email matteo   Find more posts by matteo

hey puffin, I guess Dan Lurie was joking: a command to set the users "hand velocity"... ;-)

04-30-2003 00:09

Posted by:
DanLurie

Location:
Earth>USA>New Jersey>Clifton>My Chair

Click Here to Email DanLurie   Find more posts by DanLurie

I was joking, but that was still very informative.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.