Alice Community  

Go Back   Alice Community > Alice 2 > Bugs and Troubleshooting

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
While Loop and Keypress Listener
Old
wbarnum
Member
 
Status: Offline
Posts: 20
Join Date: Jun 2015
Default While Loop and Keypress Listener - 08-21-2015, 01:33 PM

I've written a program that is supposed to move a character forward as long as the "up" arrow is pressed.

I'm using a while loop with the condition "event isKey UP is true".

The character starts moving forward when I press the "up" arrow, but when I release it, the character continues moving forward indefinitely.

I don't know if this is a bug or a case of user error.
Attached Images
File Type: jpg While_Keypress.JPG (81.3 KB, 8 views)
Attached Files
File Type: a3p SealProgram.a3p (40.8 KB, 0 views)

Last edited by wbarnum; 08-21-2015 at 02:40 PM.
   
Reply With Quote
 

Tags
event listener, loop

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