 |
|
|
|
|
 |
|
|
Super Moderator
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
|

06-29-2010, 03:05 AM
Quote:
Originally Posted by masterartisan
IN the simpleexample where does "ground say item varible from string" come from? I don't see a way to make that happen.
Thanks,
|
Comes from making a simple Say method (found under any object's methods), then making a list of strings and a number variable, then dragging the list of strings to the text part of the Say method, which causes a popup menu to appear, one of whose options is "item <x> from strings" or something similar, which lets you use the number variable as the index which chooses the string the object says.
|
|
|
|
|
Guest
|

06-29-2010, 03:14 AM
I am looking for an eloquent solution to my issue. When the person announces the team, based off the rank. In an example the phrase went like, person says item A from B say as string. This seems perfect, however, I have no idea how to get it to say this. Any help is appreciated.
Thanks,
|
|
|
|
|
Guest
|

07-26-2010, 01:46 PM
Quote:
Originally Posted by x2495iiii
Comes from making a simple Say method (found under any object's methods), then making a list of strings and a number variable, then dragging the list of strings to the text part of the Say method, which causes a popup menu to appear, one of whose options is "item <x> from strings" or something similar, which lets you use the number variable as the index which chooses the string the object says.
|
I did this and it worked once, but now it just returns a 'must not be null' message.
|
|
|
|
|
Guest
|

07-26-2010, 01:56 PM
Quote:
Originally Posted by kobusaf
I did this and it worked once, but now it just returns a 'must not be null' message.
|
Nevermind. I'm an idiot. During trial and error at the beginning I only entered 3 strings in my strings variable so anytime I picked a number above 3 the index value of say was null... or something along those lines.
|
|
|
|
|
Guest
|
Here's what I would try... -
07-29-2010, 11:09 PM
I'm just getting started myself. But this is what I would do.
Create a variable (Colleges): Set the value to 0
1.Pull the variable (Colleges) down in the method.
2.Click on world in the upper left box.
3.Then click on functions. Go down to ask user for a number.
4.Type in the question you want him to ask the user.
5. Then start creating your if/else statements.
Ex:
If Colleges ==1
Object say "You mean, the Kansas Jay hawks?"
Else
(Place another if statement below else)
If Colleges == 2
Object say "You mean Texas Longhorns?"
Else
(Place another if statement below else)...
And on the last Else statement write:
Else
Object say "You've entered an incorrect number."
And I would just keep building it like that. Now, don't get me wrong. I'm just starting out myself. So I don't know if there is a way to create a database to pull from. But if I had an assignment due and I just needed to get it done for now, that's how I would go about it.
The only problem I have, only because I haven't gotten there yet, is on that last Else statement that says, You're wrong, try again. I know how to get it to ask another question, but I'm not sure once you answered it if it would go through the if/else statement again, or just end.
Hope that helps.
|
|
|
|
|
Guest
|

08-02-2010, 03:06 PM
Quote:
Originally Posted by x2495iiii
Rank is the number variable you'd need (and I assumed you already had, sorry) to get this program done. Also, if you look at my code, I never called for the "ask user for a number" function to be dragged onto an if/else if argument, only that it be dragged onto the Rank variable's value.
First, create a new number variable called "Rank"
Then, create a list of strings called "Teams" which has the teams in order, 0-11
If [ask user for a yes or no: title = "Would you like to enter a rank?"]
then
Rank set value to [ask user for number: title = "Enter a rank number"]
if Rank < 1 or Rank > 12
then
Person say "Enter another number"
else
Rank set value to Rank - 1
Person say "Team " (joined with) [[Rank] as a string] (joined with) " is " (joined with) [rank]th item from Teams.
else
do nothing
|
Awesome. I would not have been able to do this without this post. You rule.
|
|
|
|
|
Guest
|
Where is the "from" -
08-19-2010, 10:09 PM
I have the program almost finished, but I can't figure out how to input the "From Teams". Where is the "from" function? Thanks
|
|
|
|
|
Super Moderator
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
|

08-19-2010, 11:57 PM
There isn't one. You have to make a method that sets the value of the text string to anything. Then, drag the tile for the string list to the value the string is set to in the method and a popup menu should appear, with options including "ith item from Teams" (ith meaning you use a number or number variable to define which item it uses from the list).
|
|
|
|
|
Guest
|
Unable to view attachments. -
01-10-2011, 02:05 PM
Hello,
I am honestly feeling like a huge failure with this Alice program. I ordered the text book, it never came. I'm working off to the eTextbook, and well I haven't found it all that helpful... For some things of course, but not for a good portion of things.
I've read over the examples and done them so many times that I'm just frustrated that I feel that I still have things that I don't understand. This is my last resort to ask people on the forum for assistance.
im doing the big 12 ranking, and I'm still floundering in, but, I'm wanting to do this on my own as much as possible. However, it would be great if I could see examples that people post so that I can put directions/tips/tricks to a visual. I am unable to download any attachments, page comes up stating that the files are not found. I've tried right clicking and doing an open, I've tried to do a download, and i've resorted to installing the pc health check, and it's supposed to help with a2w files...
I'll see how that goes as I' ve just installed it and paid for the registration... Please let me know if there is something else I should have tried... I also asked my instructor about this, but no response as of yet. Also, i was referred to YouTube by my instructor to assist me with my questions, and honestly did not find it helpful.
Thank you so very much.
|
|
|
|
|
Guest
|
How do I start a thread? -
01-10-2011, 08:11 PM
It's probably a really simple thing, but I can't find out how.
Nevermind: I found it. lol.
Last edited by wadesaccount; 01-10-2011 at 08:38 PM.
Reason: I failed.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Copyright ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.
|
 |