Alice Community  

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

Reply
 
Thread Tools Display Modes
Please Help Big Problem!!!!!!
Old
ates91
Guest
 
Status:
Posts: n/a
Default Please Help Big Problem!!!!!! - 01-13-2008, 11:25 AM

Hello,

I am new to Alice forums. Maybe someone can help me out. I have to do a project for my high school course. In my world I have a turtle. THe turtle is moved by the arrow keys. I also have it programmed so that when you hit the letter H, it hides in its shell. THe only problem is that if I hit the H key and then immediately hit the move key (up) he does both, which I don't want. Is there any way possible to program the world so that only one method can be called at a time. SO to speak, only one arrow will work at a time or only one event will happen. I want it to do one user-called event, then wait for it to be over before allowing another to happen.

Your help is greatly appreciated
   
Reply With Quote
Old
rich0e0rick
Senior Member
 
rich0e0rick's Avatar
 
Status: Offline
Posts: 141
Join Date: Jan 2008
Location: Sturgeon Falls
Default 01-13-2008, 12:14 PM

If you are using the (arrow keys move (object)) option,
change it to When (key) is pressed, do ....
and from there change to while (key) is pressed do...

Do one for every key(left, right, up, down)

And for your moving forward motion

When the key (up) is pressed
If (turtle is in shell)
do nothing
Else
(move forward)

Rick
   
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.