Alice Community  

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

Reply
 
Thread Tools Display Modes
Question and Answer
Old
woodsta
Junior Member
 
Status: Offline
Posts: 3
Join Date: Jul 2011
Default Question and Answer - 07-23-2011, 01:32 AM

Hi Everyone, I'm new to Alice and programming in general, i'm following a tutorial for a supposedly simple question and answer game where i have a character that asks you to guess his name, i have set the variable to randomly generate his name form a list of five names,. i get four attempts to get it right before the character tells me his name but i just can't seem to make it work, essentially i can parse my user input and get the character to say no my name is not (user input) and i have tried using a while clause but it doesn't seem to work , i may be uning it incorrectly though.

Any assistance would be appreciated

Cheers

Woodsta
   
Reply With Quote
Old
sfunk
Senior Member
 
sfunk's Avatar
 
Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
Default 07-23-2011, 02:30 AM

upload your world so we can see what you have so far so we can give suggestions on how to fix it


If you are stuck on a project, check out the tutorials I made here at this link:

http://alice.org/community/showthread.php?p=36778#post36778

There are lots of tutorials on it so far, including some youtube videos, check it out

Or..

Go to my youtube channel to check out my alice 2.2 tutorials I have there..

http://www.youtube.com/user/sfunk1992?feature=mhsn
   
Reply With Quote
Sorted it
Old
woodsta
Junior Member
 
Status: Offline
Posts: 3
Join Date: Jul 2011
Default Sorted it - 07-23-2011, 02:34 AM

Hi there thanks but i think i've sorted it.

The world is attached anyway, i think my if statement was in the wrong place and hence why it did not work as it thought it should, must buy that textbook.!!

The only thing i've not managed to get it to do is after the forth attempt skip the" no my name is not USERINPUT and go straight to "hats four attempts i'll just have to tell you my name, it's RANDOMNAME.
Attached Files
File Type: a2w Bear_q&a.a2w (351.1 KB, 9 views)
   
Reply With Quote
nope still needs owrk
Old
woodsta
Junior Member
 
Status: Offline
Posts: 3
Join Date: Jul 2011
Default nope still needs owrk - 07-23-2011, 02:42 AM

just checking my class notes, have to change this to directly tell the name after the 4th attempt, i'm thinking a new if statement??
   
Reply With Quote
Old
sfunk
Senior Member
 
sfunk's Avatar
 
Status: Offline
Posts: 1,112
Join Date: Mar 2011
Location: I don't know
Default 07-23-2011, 03:04 AM

you have the right idea, you should create a new world variable, a number variable, which have it set at 4 to start with, and everytime the player guesses the name, have that variable count down, when it reaches 0 you will need an if/else statement checking to see if it is zero, and when that that variable reaches zero, have that if/else statment tell the player the persons name, hope you can understand what I just said


If you are stuck on a project, check out the tutorials I made here at this link:

http://alice.org/community/showthread.php?p=36778#post36778

There are lots of tutorials on it so far, including some youtube videos, check it out

Or..

Go to my youtube channel to check out my alice 2.2 tutorials I have there..

http://www.youtube.com/user/sfunk1992?feature=mhsn
   
Reply With Quote
Old
ZoiieeMadden
Junior Member
 
Status: Offline
Posts: 2
Join Date: Oct 2011
Default 10-25-2011, 10:54 AM

Hey All, I am new here and was having a similar problem. I will hijack your answer and read the tutorials! So thanks for sharing!

--------------------
Zoiiee Madden
   
Reply With Quote
Old
room14
Senior Member
 
room14's Avatar
 
Status: Offline
Posts: 549
Join Date: Nov 2009
Location: Auckland New Zealand
Default 10-25-2011, 11:49 PM

lolwut?


:D
   
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.