Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

View Poll Results: is it good
fabulous 6 50.00%
good 6 50.00%
ok 2 16.67%
not so good 1 8.33%
Multiple Choice Poll. Voters: 12. You may not vote on this poll

Reply
 
Thread Tools Display Modes
mouse tracking engine (follows mouse, no clicking required)
Old
arty-fishL
Senior Member
 
arty-fishL's Avatar
 
Status: Offline
Posts: 1,878
Join Date: Mar 2008
Location: In the corner of your eye
Talking mouse tracking engine (follows mouse, no clicking required) - 11-07-2009, 03:27 PM

Mouse tracking engine (follows mouse, no clicking required).

Alice has no function for making an object follow the mouse.
I solved this problem.
Hope you can use this engine in your worlds somehow, but if you do use it then post back to me so I can see what you've made of it (not so i can steal the credits for it).
The 'sensitivity' global variable can be refined to make the ball move at the same speed as the mouse.

What happens is it senses changes in mouse distances from the edges, then it translates these into directions for the on screen ball to move and calculates the ammount of metres equal to mouse distances for it to move.
it also uses a scale factor to fit different screen settings.

ps this is quite complicated just for a mouse movement tracker.


----------------
Now playing: David Guetta ft. Akon - Sexy Female dog
via FoxyTunes
Attached Files
File Type: a2w mouse track.a2w (281.3 KB, 212 views)
   
Reply With Quote
sweet
Old
rich0e0rick
Senior Member
 
rich0e0rick's Avatar
 
Status: Offline
Posts: 141
Join Date: Jan 2008
Location: Sturgeon Falls
Thumbs up sweet - 11-09-2009, 04:31 PM

lol, this is weird, i just did a world like that to, but my code is much simpler, im gona post the world soon, its a jet fighter controlled by the mouse... lol, i play with the game more than i work on it...

good job man!!! the way you did it seems impossible!!, i just use the mouse distance to edges and used the X math formula to switch it into meters from 10 meters away from the camera... yours looks like plain code!!!! sweet!!!!

again, good work!

rick


im back!!! FINNALY!!! got windows working on my mac again!!!
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 12-22-2009, 12:26 PM

It was ok, because on my computer, i dont know if it was supposed to go off, because when i moved the mouse in teh end, it went off and was following teh mouse very incorrectly, but other than that...GREAT JOB!


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
zarfang8
Guest
 
Status:
Posts: n/a
Default 12-22-2009, 02:07 PM

I have actually never done a thing with following the mouse cursor. I have never been good with that, but I know that Jediaction uses a lot of 1st person shooters with mouse cursor aiming. I liked it though, that's really a lot of coding you did.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 02-06-2010, 05:44 PM

Good job, but like I said...glitches or no


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
jtrawker
Guest
 
Status:
Posts: n/a
Default 05-04-2010, 01:07 PM

ok. but how would I get a series of object to move via a series of clicks? in other words, if i have a company of tanks how do i get them to move where i want them to by clicking?
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 578
Join Date: Nov 2008
Location: In the interwebs
Default 05-04-2010, 01:39 PM

Quote:
Originally Posted by jtrawker View Post
ok. but how would I get a series of object to move via a series of clicks? in other words, if i have a company of tanks how do i get them to move where i want them to by clicking?
Use this engine, and whenever the mouse is clicked, simply have the tank move to where the cursor object is.


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 05-04-2010, 02:22 PM

Rememerb my Hero's Tadctics, i ahd the saem problem, no body answered my question

Quote:
Originally Posted by zarfang8 View Post
I have actually never done a thing with following the mouse cursor. I have never been good with that, but I know that Jediaction uses a lot of 1st person shooters with mouse cursor aiming. I liked it though, that's really a lot of coding you did.
thanks


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames

Last edited by x2495iiii; 05-04-2010 at 10:52 PM. Reason: Double-posts
   
Reply With Quote
Old
jtrawker
Guest
 
Status:
Posts: n/a
Default 05-05-2010, 12:36 PM

Quote:
Originally Posted by zonedabone View Post
Use this engine, and whenever the mouse is clicked, simply have the tank move to where the cursor object is.
ok... but how would i do that multiple times? like for a different number of tanks?
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 05-05-2010, 01:15 PM

Im waiting for the same answer to. I started and posted my game and still no one has helped me...so...waiting


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Reply

Tags
distance, follow, mouse, movement, track

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.