Alice Community

Alice Community (
-   How do I...? (
-   -   Typing program (

Landino 03-21-2010 12:21 AM

Typing program help please!!!!!!!!!!!
:eek: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.

Niteshifter 03-21-2010 02: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 ;).

Landino 03-22-2010 03: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.

Niteshifter 03-22-2010 05: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)

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

All times are GMT -5. The time now is 12:09 AM.

Copyright ©2020, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.