Alice Community  

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

Reply
 
Thread Tools Display Modes
mask events
Old
minkscooter
Guest
 
Status:
Posts: n/a
Default mask events - 08-15-2008, 06:06 AM

I created an event "Let <arrow keys> move <character>". I'm wondering how I can mask that event except when a variable for that character (variable name = "looking") is true. I only want the arrow keys to control one character at a time depending on the state of the character. I tried dragging the arrow-key event into a "While Character.looking is true" event, but couldn't get it to land there.
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 08-15-2008, 09:27 AM

Not sure you can do it for the arrow keys but have a couple of ideas I'll try. Will post something if it works.

You can get that effect for mouse control by controling the "seldom used property" IsFirstClass individually for each item in the list of controled objects. Just a single object in the attached, but that should give you the idea.

Concerning a comment in another posting on Storytelling Alice. If you look at the papers on the results of the effort, the increase in the percentage of time students actually spent programming was rather impressive. It's a bit buggy on a PC (though quite good for a research program) - but I personally found the same result.
Attached Files
File Type: a2w Mouse Control Disable.a2w (218.3 KB, 49 views)
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 08-15-2008, 10:05 AM

Apparently (yet another) bug or, more kindly "undocumented feature" in Alice 2.0. It doesn't look like you can use a variable, even of type "object," in the use arrow keys to move event. The drag and drop works OK but I get an error when I try to run the world.

The attached code - a bit complex for a simple task - does seem to acomplish what I think you want to do.
Attached Files
File Type: a2w Switch Arrow Control.a2w (326.0 KB, 54 views)
   
Reply With Quote
can u guys help me with allice?
Old
ddz
Guest
 
Status:
Posts: n/a
Default can u guys help me with allice? - 08-16-2008, 11:48 PM

can any one tell me how do u use allice to creat games??
   
Reply With Quote
Old
DickBaldwin
Guest
 
Status:
Posts: n/a
Default 08-17-2008, 08:34 AM

Quote:
Originally Posted by ddz View Post
can any one tell me how do u use allice to creat games??
You can start by studying the free Alice tutorials listed below.

Dick Baldwin
Free Alice tutorials: http://www.dickbaldwin.com/tocalice.htm
Free Scratch tutorials: http://www.dickbaldwin.com/tocHomeSchool.htm
Free Java/C#, etc. tutorials: http://www.dickbaldwin.com/toc.htm
   
Reply With Quote
Old
minkscooter
Guest
 
Status:
Posts: n/a
Default 08-28-2008, 07:33 AM

DrJim, your Switch Arrow Control is wicked clever!

I used the movable cone in my test program (with isShowing set to false) to add a switchArrowControl(subject) method. I just used it to turn off "Let arrow keys move ..." at the end when the penguin is found, but it could be used to switch control to any subject. Thanks for the solution!
Attached Files
File Type: a2w Find_the_Penguin.a2w (2.57 MB, 54 views)
   
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 ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.