Alice Community  

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

Reply
 
Thread Tools Display Modes
Replying to a string
Old
LuisN
Member
 
Status: Offline
Posts: 17
Join Date: Apr 2010
Location: Arizona
Default Replying to a string - 04-16-2010, 02:23 PM

When Alice prompts you to enter a string, is there any way that I can get an object to reply to that string? First instance:
cat say "what is your name"
randomguy2 say "ask user for a string question=default string"
I want the cat to reply to the name that the user types in, if that is possible. Thank you ^_^

Also, I hope I am not asking for to much, but if there is no way to get the cat to reply to the string, could someone please tell me how to ask the user for a number (such as pick a number between 1-10) and depending on what number the object does something... Sorry!

Last edited by LuisN; 04-16-2010 at 02:26 PM.
   
Reply With Quote
Oh and...
Old
LuisN
Member
 
Status: Offline
Posts: 17
Join Date: Apr 2010
Location: Arizona
Smile Oh and... - 04-16-2010, 02:24 PM

Yay my first post! ^_^ High five! (Unless you count this one...)

Last edited by LuisN; 04-16-2010 at 02:25 PM. Reason: I read what I typed AFTER I have hit enter
   
Reply With Quote
Old
Niteshifter
Guest
 
Status:
Posts: n/a
Default 04-17-2010, 02:25 AM

I would use a string variable and have it go:

set name to "ask user for a string"
randomguy2 say name
cat say "Hello" joined with name

Using the variable will let you use this name as many times as you want.
   
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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.