Alice Community  

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

Reply
 
Thread Tools Display Modes
parameters
Old
maxf
Guest
 
Status:
Posts: n/a
Question parameters - 10-17-2009, 07:55 PM

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)
   
Reply With Quote
Old
x2495iiii
Super Moderator
 
x2495iiii's Avatar
 
Status: Offline
Posts: 3,508
Join Date: Dec 2008
Location: Somewhere in the Continental U.S.
Default 10-18-2009, 03: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.
   
Reply With Quote
Reply

Tags
method, parameter

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