Alice Community  

Go Back   Alice Community > General Discussion > Questions and Comments

Reply
 
Thread Tools Display Modes
Question about variables
Old
bfry
Member
 
Status: Offline
Posts: 22
Join Date: Jan 2012
Default Question about variables - 05-02-2012, 12:31 AM

I'm a beginner using Alice 2.2 and I was trying to find information about global variables. In older posts on this forum I read that variables are global and can be used by any method, but whenever I create a variable I get a dialog box stating the variable is local only. So, I'm confused. Can variables be global in Alice (more specifically Alice 2.2) and if so, how do I create 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 05-02-2012, 01:56 AM

You are more than likely creating your variables in the wrong area. Click on "world" in your object list (located on the left hand side of your screen). Then below the object list there are three tabs, properties, methods and functions. The tab you want is properties, once you click the "properties" tab, a button will appear that reads "create new variable". Well you create your variable here while being clicked on "world" inside your object list, which then makes the variable "global" (allowed to be used in any method/function)
Attached Images
File Type: jpg Help.jpg (62.5 KB, 26 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
Resolved
Old
bfry
Member
 
Status: Offline
Posts: 22
Join Date: Jan 2012
Default Resolved - 05-02-2012, 05:42 AM

Indeed I have been creating my variables in the wrong place to make them global. I greatly appreciate the assistance sfunk. Thank you for your quick response!
   
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 ©2017, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.