Alice Community

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

maxf 10-17-2009 06:55 PM

parameters
 
I have a parameter that is set by the user in my starting method. but i need to use the value of that parameter in another method use later in the program. how can i move the parameter from one method to the other without asking the user for the value again? (i already tried the clipboard and it didn't work)

x2495iiii 10-18-2009 02:56 AM

Since it's a number that is used by more than one method, it would be better suited as a world-class variable. Go to the properties tab of the world and create a variable which sets its value to whatever the user wants it to be at the start of the world. This way, you can have any method reference the variable at any time wthout worrying about passing values.


All times are GMT -5. The time now is 03:38 PM.

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