Alice Community  

Go Back   Alice Community > Alice 3 > How Do I?

Reply
 
Thread Tools Display Modes
missing universal varibles
Old
jtljmeyer
Member
 
Status: Offline
Posts: 19
Join Date: May 2012
Location: Iowa
Exclamation missing universal varibles - 03-10-2013, 01:10 PM

I just downloaded the new update of alice 3. I made some universal variables, but I am unable to find them and use them in various procedures. For example I need to keep score between the computer character and the user. The first to ten wins. Have you moved them someplace else?
   
Reply With Quote
My Best Guess
Old
MrMoke
Senior Member
 
MrMoke's Avatar
 
Status: Offline
Posts: 501
Join Date: Sep 2007
Location: Austin, Texas
Unhappy My Best Guess - 04-07-2013, 10:47 AM

Best Guess at this point is that the "Program" button in the "Type Hierarchy" would be a good start.

From there you can create new properties(aka: variable/constant types) that "might" be available to multiple Scenes(maybe).

If you click on the "Scene" tab, there is also a button to add new "unmanaged" properties(aka: variables/constants) to the Scene. Best guess is that these would be available as locals to the Scene, but maybe not the program?

No documentation to support my assumptions at this point.
   
Reply With Quote
Universal variables
Old
djslater107
Administrator
 
Status: Offline
Posts: 190
Join Date: Jan 2007
Default Universal variables - 04-08-2013, 11:43 AM

Alice 3.1 uses an object oriented implementation, designed to support learning Java. As in Java, there really is no such thing as universal variables in Alice 3. The fields that you created in the Scene class belong to the scene and not to the entire program...

Fields created in the Program belong to the Program class.

Fields that you create in the Scene must be passed as parameters to the class methods of other classes that would like to use them.


Don Slater
Alice Team
Carnegie Mellon University
   
Reply With Quote
Reply


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 ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.