Alice Community  

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

Reply
 
Thread Tools Display Modes
How do I do a calculation in Alice 2.2
Old
zlloyd1
Junior Member
 
zlloyd1's Avatar
 
Status: Offline
Posts: 8
Join Date: Nov 2011
Location: Virginia
Question How do I do a calculation in Alice 2.2 - 11-05-2011, 12:32 AM

I have a project where I have two user inputted numbers that I need to divide and return a value. It is simple really, the first is the distance and the second is the speed limit. I need to divide the speed limit into the distance and return the outcome in hours to the screen. This is a dumb issue but I am new to Alice and would greatly appreciate any advice, and thanks in advance!!
   
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 11-05-2011, 07:23 AM

Check List of things needed:if you don't know how to do these, i'll make simple explinations of them further below.

1.)Need to know how to ask for user input

2.) need to know how to create world variables

3.) Need to know how to create methods and events to make your world run.

HOW TO:

1.) this is done inside of the "world">"functions tab" and is needed to be placed inside of 3D text, (i'll attach a world showing how this is done)

2 and 3 are shown in the world I provided

I showed how to make a 3d text object represent a number variable, I walked you through on how to create number variables, then I showed you how to ask for user input, try the rest on your own
Attached Files
File Type: a2w quick_help.a2w (177.4 KB, 30 views)


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
Your file only seems to have one method??
Old
zlloyd1
Junior Member
 
zlloyd1's Avatar
 
Status: Offline
Posts: 8
Join Date: Nov 2011
Location: Virginia
Question Your file only seems to have one method?? - 11-05-2011, 11:42 PM

I tried to follow your instructions but got stuck where it says "now go to world functions and drag the "ask user for number" tile into the number of user_input method (check mine as reference)". I am not sure what this is saying because the entire file only has one method in it, so there is nothing to check as a reference. I do see in the event window there are other methods being called but I do not know how to find them to look at them.
   
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 11-06-2011, 01:14 AM

in the method list, on the left side of the screen, there should be the methods I use, just click "edit" and they will pop up showing what they were done


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
Reply

Tags
functions, math

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.