Alice Community Mouse Distance From Function

 I Need Help With "mouse distance to" Functions
 JAA Member     Status: Offline Posts: 31 Join Date: Jul 2010 I Need Help With "mouse distance to" Functions - 07-11-2010, 10:26 PM I made a simple world with the following event: When the world begins do [world.my first method] ...and the following method: world.my first method While [true] -Print [mouse distance to left edge] -Print [mouse distance to top edge] My goal was to get a print out of the mouse's position relative to the left and top edge of the screen as I move the mouse around. Instead it just keeps printing: "the value of world.my first method mouse distance from left edge is none" "the value of world.my first method mouse distance from top edge is none" ...as I move the mouse around. I can't figure out why this is the case, can someone help me? If I could get Alice to recognize these values I would make the following events: (note: L = distance from left edge of screen to the center of the screen : T = distance from top edge of screen to the center of the screen) While [mouse distance from left edge > L] Beginning: During: [camera turn left at speed [1/4 revolution] per [1]second] End: While [mouse distance from right edge < L] Beginning: During: [camera turn right at speed [1/4 revolution] per [1]second] End: While [mouse distance from left edge > T] Beginning: During: [camera turn forward at speed [1/4 revolution] per [1]second] End: While [mouse distance from left edge < T] Beginning: During: [camera turn backward at speed [1/4 revolution] per [1]second] End: ...Then I'd throw in a tiny "+" at the center of the screen with its vehicle set to the camera. Why can't it be this simple?!!!!!! I know that that the above events would make it nearly impossible to keep the screen still but i don't care for now. I just want this basic thing to work and I'll tweak it later. Out of the 7 schools I applied for, Carnegie Mellon is the only one that didn't accept me. They wait listed me, but I hold no grudges. Alice is awesome and Claytronics , om*g. Some one should figure out how to put these two projects together. It would revolutionize not only the gaming industry, but the world... scratch that, the Universe... scratch that, the Multiverse! Last edited by JAA; 07-11-2010 at 10:49 PM.
 x2495iiii Super Moderator     Status: Offline Posts: 3,508 Join Date: Dec 2008 Location: Somewhere in the Continental U.S. 07-11-2010, 11:11 PM Hang on a sec, let me see if I can duplicate your conditions. So far it's working fine for me...
x2495iiii
Super Moderator

Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
07-11-2010, 11:23 PM

Well, I tried doing what you said you did and it works fine. See for yourself.
Attached Files
 StuffWorld.a2w (165.4 KB, 39 views)

 I think I know why
 JAA Member     Status: Offline Posts: 31 Join Date: Jul 2010 I think I know why - 07-11-2010, 11:29 PM I think I figured out the problem. Rich0e0rick said, "The functions that figure out the mouse movements don't work on the mac version of Alice." If this is the case then I really hope they fix this. I notice the Mac version is really buggy. I was trying this on my Mac. I'll try it on a PC and see what happens. Out of the 7 schools I applied for, Carnegie Mellon is the only one that didn't accept me. They wait listed me, but I hold no grudges. Alice is awesome and Claytronics , om*g. Some one should figure out how to put these two projects together. It would revolutionize not only the gaming industry, but the world... scratch that, the Universe... scratch that, the Multiverse!
 No worries
 JAA Member     Status: Offline Posts: 31 Join Date: Jul 2010 No worries - 07-11-2010, 11:45 PM No worries, I got Alice on my PC and I'm going to fix my Windows partition on my Mac so I don't have to deal with this. There are very few things I like better about Windows than Mac and Alice is one of them. Out of the 7 schools I applied for, Carnegie Mellon is the only one that didn't accept me. They wait listed me, but I hold no grudges. Alice is awesome and Claytronics , om*g. Some one should figure out how to put these two projects together. It would revolutionize not only the gaming industry, but the world... scratch that, the Universe... scratch that, the Multiverse!
 x2495iiii Super Moderator     Status: Offline Posts: 3,508 Join Date: Dec 2008 Location: Somewhere in the Continental U.S. 07-11-2010, 11:58 PM I don't want to get into the whole PC vs. Mac debate or anything cause it's pointless, I just know what I like. I like Windows.
JAA
Member

Status: Offline
Posts: 31
Join Date: Jul 2010
07-12-2010, 01:13 AM

Quote:
 Originally Posted by x2495iiii I don't want to get into the whole PC vs. Mac debate or anything cause it's pointless, I just know what I like. I like Windows.
Lol. Hey that's fine I'm a Mac and your a PC. Well, except for right now I'm a PC, but only to make the camera follow the mouse in Alice. We can still get along though. I attached the program below; it only works for PC
Attached Files
 ScreenFollowsMouse.a2w (262.1 KB, 28 views)

Out of the 7 schools I applied for, Carnegie Mellon is the only one that didn't accept me. They wait listed me, but I hold no grudges. Alice is awesome and Claytronics , om*g. Some one should figure out how to put these two projects together. It would revolutionize not only the gaming industry, but the world... scratch that, the Universe... scratch that, the Multiverse!

 Thread Tools Display Modes Linear Mode

 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 Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Announcements     Community News and Announcements Alice 3     How Do I?     Works In Progress     Share Your World     Share Custom Classes     Bugs and Trouble Shooting     Suggestion Box Alice 2     How do I...?     Works-In-Progress     Share Worlds     Share Objects     Bugs and Troubleshooting     Suggestion Box Educators     Teaching with Alice     Teaching Using Alice 3     Teaching Using Alice 2     CS Principles and Alice     AP CSA and Intro to Java and Alice     Workshops General Discussion     Questions and Comments     The Lounge