Alice Community

Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   Feeling lost.... (http://www.alice.org/community/showthread.php?t=4112)

Lodemai 03-22-2010 09:57 PM

Feeling lost....
 
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.:confused::confused::confused:

rankhornjp 03-22-2010 10: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"

Lodemai 03-23-2010 08:44 PM

Still not getting it
 
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. :(

rankhornjp 03-23-2010 09:47 PM

post your world and I will look at it

Lodemai 03-23-2010 09:50 PM

Sorry how do I do that? I very new to this...

rankhornjp 03-23-2010 09: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

Lodemai 03-23-2010 10:01 PM

1 Attachment(s)
I hope I did this right...

rankhornjp 03-23-2010 10: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.

Lodemai 03-23-2010 10: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...:confused:

rankhornjp 03-23-2010 10: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"


All times are GMT -5. The time now is 06:27 AM.

Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.