Alice Community  

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

Reply
 
Thread Tools Display Modes
Typing program help please!!!!!!!!!!!
Old
Landino
Guest
 
Status:
Posts: n/a
Smile Typing program help please!!!!!!!!!!! - 03-21-2010, 01:21 AM

I am working on a project that includes making a Typing program. For this program I have made an array consisting of all the letters in the sentence, in the order that they appear in the sentence. I need a way to make each letter spin when the correct key is typed, in the correct order, and way to prompt the user to press the correct key when an incorrect key is entered. any hints would be appreciated, I am new to alice so detail would be nice.

Last edited by Landino; 03-22-2010 at 05:06 PM.
   
Reply With Quote
Old
Niteshifter
Guest
 
Status:
Posts: n/a
Default 03-21-2010, 03:36 AM

I would make a spin method and use the "'x'th item in the array" as the parameter when the key is pressed .
   
Reply With Quote
Old
Landino
Guest
 
Status:
Posts: n/a
Default 03-22-2010, 04:19 PM

but how do I "lock" that object from moving once it has been typed,
i.e. in the phrase The cat is good. How do I get the first t to not spin when the user types the second t, or to only spin once the whole time the world is running.
   
Reply With Quote
Old
Niteshifter
Guest
 
Status:
Posts: n/a
Default 03-22-2010, 06:35 PM

You could have a variable work with an if statement saying something like:

var = 0

if the key entered == item var in the array then
var = var + 1
spin(item var in the array)
end

This will make it so they need to do the first letter before moving onto the next.
   
Reply With Quote
Reply

Tags
array, do in order, loop, loop while if/else lab2

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