Alice Community  

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

Reply
 
Thread Tools Display Modes
Feeling lost....
Old
Lodemai
Guest
 
Status:
Posts: n/a
Unhappy Feeling lost.... - 03-22-2010, 10:57 PM

I have started using ALICE for my first ever programming class. For the most part by just watching the tutorials and playing with the program I have been able to figure out a lot. One of my assignments has me totally lost I need to create a formula with the answer showing up in a text bubble. I tried creating the two variables in which one is divided by the other but it doesn't seem to work right not sure I'm telling the program how to divide. Then I have NO idea how to put the formula into a text bubble where it calculates the correct answer.

Please help... Feeling stupid.
   
Reply With Quote
Old
rankhornjp
Guest
 
Status:
Posts: n/a
Default 03-22-2010, 11:15 PM

create new function: select number, give it a name, click OK

on the screen it will say "return 1"

click the down arrow next to the "1" and a drop down menu will appear select the first variable from the "expressions" then click the down arrow again and select "math" ....."variable/"...."expressions"...."variable2"


method:
object say "[function] as a string"

Last edited by rankhornjp; 03-22-2010 at 11:21 PM.
   
Reply With Quote
Still not getting it
Old
Lodemai
Guest
 
Status:
Posts: n/a
Default Still not getting it - 03-23-2010, 09:44 PM

I have tried what you have stated but I'm not able to get the character to give the answer it just keeps giving me the formula.
   
Reply With Quote
Old
rankhornjp
Guest
 
Status:
Posts: n/a
Default 03-23-2010, 10:47 PM

post your world and I will look at it
   
Reply With Quote
Old
Lodemai
Guest
 
Status:
Posts: n/a
Default 03-23-2010, 10:50 PM

Sorry how do I do that? I very new to this...
   
Reply With Quote
Old
rankhornjp
Guest
 
Status:
Posts: n/a
Default 03-23-2010, 10:53 PM

at the top of the text box there is a smiley face and a paper clip. click on the paper click and then browse your computer for the file and upload it. then click submit reply
   
Reply With Quote
Old
Lodemai
Guest
 
Status:
Posts: n/a
Default 03-23-2010, 11:01 PM

I hope I did this right...
Attached Files
File Type: a2w Road to Hana.a2w (1.31 MB, 132 views)
   
Reply With Quote
Old
rankhornjp
Guest
 
Status:
Posts: n/a
Default 03-23-2010, 11:05 PM

ok, one thing i see is you variables are in the wrong place. Delete those and then click on "world" then "properties" then "create new variable" and create them there.

Try that and let me know.
   
Reply With Quote
Old
Lodemai
Guest
 
Status:
Posts: n/a
Default 03-23-2010, 11:17 PM

Okay I have done as you have said but i still can't get the character to say the answer to the formula. It just wants me to type the statement...
   
Reply With Quote
Old
rankhornjp
Guest
 
Status:
Posts: n/a
Default 03-23-2010, 11:25 PM

do this:


"Object" say "hello"

replace "hello" with "[what] as a string" function

click the down arrow next to [what] and select "expressions" then "world.Hours to Hana"
   
Reply With Quote
Reply

Tags
formulas, variable

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.