View Full Version : 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?

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.

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.