Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Is It Possible To Have The Mouse Vehicle An Object? (http://www.alice.org/community/showthread.php?t=10916)

AliceAndConnor 11-20-2014 09:09 AM

Is It Possible To Have The Mouse Vehicle An Object?
 
Hi everyone! I was wondering if it is possible for the mouse to vehicle an object? :) This would really help me with my new game! Thank you so much for reading!

hmerrillb 11-20-2014 09:53 AM

thanks..:)

AliceAndConnor 11-20-2014 05:46 PM

No Worries!
 
No problem hmerrillb! :):):):):):):):):)

chickentree 11-21-2014 12:13 PM

[QUOTE=AliceAndConnor;55134]Hi everyone! I was wondering if it is possible for the mouse to vehicle an object? :) This would really help me with my new game! Thank you so much for reading![/QUOTE]

There is an event "Let the mouse move objects" That would do the positioning for you and "When the Mouse is clicked on Something" could be used to have the same object react to mouse clicks.
The Let the mouse move objects is not as straight forward as one would think. It is looking for a list of objects, but a list can contain one item. So, if you look just to the right of the stage window there is a "create new event" button. Click it and then select "Let the mouse move objects." This should add the new event to the event list.
Now, in the new event, click on the "Any Object" button and select "create new list" in the dialog that pops up:[LIST=1][*]Give the list a meaningful name maybe something like mouseObjects.[*]Make sure the type "object" is selected.[*]Under values click new item.[*]Click the <None> button in the new item and select the item you want the mouse to move.[*]Click OK to close the dialog and add the object to the list.[/LIST]
This will give the mouse control over Forward & Backward and Left & Right automagically. For turning or moving up and down you would need to add some event and program it to do what you want. Typically this would be a keyboard event although it could be some other action.

Note: Look for "hidden" options in events! For instance if you right click on a "when a key is typed" event, you will see a menu that includes "change to" selecting this allows you to change the event from "when a key is typed" to "while a key is pressed" which, in many cases is what you really want. I know that a "When the world starts" event can be changed into a "while the world is running" event. There are probably other alternative events waiting to be discovered.

Mark

AliceAndConnor 11-21-2014 02:36 PM

Awesome!
 
Thank you so much Mark! That was extremely helpful! I really appreciate such an in-depth tutorial! Very good quality! Now my new game will be much better!
Thanks again and have a nice week, Connor


All times are GMT -5. The time now is 01:13 PM.

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