PDA

View Full Version : Please Help Big Problem!!!!!!


ates91
01-13-2008, 12:25 PM
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

rich0e0rick
01-13-2008, 01: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)

:D Rick :D