Alice Community  

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

Reply
 
Thread Tools Display Modes
Needing assistance with a list or array
Old
rwalther
Guest
 
Status:
Posts: n/a
Post Needing assistance with a list or array - 03-01-2010, 02:58 PM

I am working on trying to create a list or array for a set of numbers and names. I am creating a list of the Big 12 conference in college sports. I need for a character to associate a number with the team. The trouble I am having is when I create a list, I cannot get a number when the character asks for it to associate the number with the team in the list. I can get it to work when it picks at random from the list, but not when I type a specific number in. I am using the IF/Else command and I have it ask the user for a number. Then I want my "Coach" to say the number and the name of the team with that number. How can I get the number to associate with the team in a list and then for the coach to say the number and name of the team? I am using Alice 2.0.

Here is my list of numbers and teams:
1. Kansas Jayhawks
2. Oklahoma Sooners
3. Missouri Tigers
4. Nebraska Cornhuskers
5. Texas Longhorns
6. Iowa State Cyclones
7. Texas A&M Aggies
8. Texas Tech Red Raiders
9. Oklahoma State Cowboys
10. Colorado Buffaloes
11. Kansas State Wildcats
12. Baylor Bears
   
Reply With Quote
Old
zonedabone
Senior Member
 
zonedabone's Avatar
 
Status: Offline
Posts: 578
Join Date: Nov 2008
Location: In the interwebs
Default 03-01-2010, 04:41 PM

This one, again! Try looking at the thread:
http://www.alice.org/community/showthread.php?t=3308


'Apple Macintosh' - An anagram of 'Complaints Heap'

M.A.C.I.N.T.O.S.H. - Machine Always Crashes, If Not, The Operating System Hangs.

You're *such* a mac person.
   
Reply With Quote
Old
rwalther
Guest
 
Status:
Posts: n/a
Default 03-01-2010, 05:05 PM

How do you create a method that is called set value to? I see that from the example that was posted by x2495iiii but I do not understand how to get that option.
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 03-01-2010, 05:12 PM

Drag the variable tile onto the scripting area.


(')>
   
Reply With Quote
Old
rwalther
Guest
 
Status:
Posts: n/a
Default 03-01-2010, 05:22 PM

Ok here is a copy of what I have so far, I have created the array of teams and I am wanting to set that up to associate the numbers with the name.

** Here is the other question, How did you get the field item "" from ""
I cannot seem to find that.
Attached Files
File Type: a2w big 12.a2w (505.0 KB, 153 views)

Last edited by rwalther; 03-01-2010 at 05:47 PM.
   
Reply With Quote
loop back to begining
Old
crashkarz21
Guest
 
Status:
Posts: n/a
Default loop back to begining - 05-26-2010, 10:23 AM

I have a World where I ask the user if they want to repeat the above steps with a yes or no question. If they say NO then the world ends, if they say YES I need it to loop back to the beginning to play all over again. I can not figure out the loop, can anyone help??
   
Reply With Quote
Old
crashkarz21
Guest
 
Status:
Posts: n/a
Default 05-26-2010, 10:32 AM

Here is how it matches up with the entered number, I cant figure out how to loop it back.... i need to replace "Sorry i cant figure it out" in my code with a loop to start at beginning... any one know!?

world.my first method ( )
Rank = 1 , RankList = , Ask = true
Rank set value to ( ask user for a number question = Enter a rank: )
If ( Rank < 1 )
Mikey say Invalid Number duration = 3 seconds fontName = comic sans ms fontSize = 25
Else
If ( Rank > 12 )
Mikey say Invalid Number duration = 3 seconds fontName = comic sans ms fontSize = 25
Else
Do together
Mikey say ( item Rank from RankList ) duration = 3 seconds fontName = comic sans ms fontSize = 25
Mikey.bounce
Ask set value to ( ask user for yes or no question = Whould you like to enter another rank? )
If Ask
Do together
Mikey.bounce
Mikey say Sorry can't figure that out! fontSize = 25 fontName = comic sans ms
   
Reply With Quote
hum??
Old
tiggrowl
Guest
 
Status:
Posts: n/a
Question hum?? - 12-11-2010, 08:48 PM

still having a bit of a hard time with this world.... can anyone please help me with getting the world to loop for the entering of more than one number per play.....
Attached Files
File Type: a2w big12 backed up on Dec 11 2010 at 6h50m16s PM.a2w (1.15 MB, 61 views)
   
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 ©2018, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.