Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Setting an object variable to "Object under mouse"
Old
yossiy
Member
 
Status: Offline
Posts: 19
Join Date: Apr 2012
Location: Tel Aviv, Israel
Default Setting an object variable to "Object under mouse" - 03-08-2013, 04:54 PM

Hi,
I'm trying to write a code for that will set an object variable to the "Object under mouse cursor" (see the attached example).
For some reason it causes Alice to Crash (I tried on two computers, in Alice 2.3 and 2.3.2).
I followed the instructions on this thread
but it still doesn't work.
I would appreciate your advice.
Yossi Yaron
Attached Files
File Type: a2w Selection.a2w (749.4 KB, 6 views)
   
Reply With Quote
Old
jnawrocki
Member
 
Status: Offline
Posts: 32
Join Date: Jan 2010
Location: Toledo, OH
Default 03-10-2013, 07:04 PM

Hi Yossi

Please see the attached file. Is this something like what you were trying to do? I used a parameter to represent the object that the mouse clicked on. Hope this helps.
Attached Files
File Type: a2w Selection.a2w (753.7 KB, 12 views)
   
Reply With Quote
Thanks!
Old
yossiy
Member
 
Status: Offline
Posts: 19
Join Date: Apr 2012
Location: Tel Aviv, Israel
Smile Thanks! - 03-11-2013, 06:44 AM

Close enough. Thank you!
From your method I updated the global variable (world.sel) to the parameter value and all is well.
I'm at school right now and our (limited) bandwidth is used by about 100 people, so I'll upload the final version from home.
Thanks again
Yossi
   
Reply With Quote
Old
JustinOverdorf
Junior Member
 
Status: Offline
Posts: 2
Join Date: Mar 2013
Location: Mass
Default 03-21-2013, 05:09 AM

Quote:
Originally Posted by jnawrocki View Post
Hi Yossi

Please see the attached file. Is this something like what you were trying to do? I used a parameter to represent the object that the mouse clicked on. Hope this helps.
So does this parameter now move the character to the clicked object? Could I set it to stop 2 meters infront of the clicked object?
   
Reply With Quote
Old
DMKDMC
Junior Member
 
Status: Offline
Posts: 1
Join Date: Mar 2013
Location: hbbv
Default 03-30-2013, 10:14 AM

Thank you
jsc Hd
   
Reply With Quote
Reply

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 ©2022, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.