|
Get multiple variables of same type Anders from Norway [2 posts] |
14 year
|
Hi! Just started exploring RR, what a great program! Now, I'm in a early stage of making a Rubiks cube solver - and trying to grab multiple "Sample_Color" variables from JAVA (as I need 9 of those on a 3 x 3 x 3 cube) at the same time. The question is how to do it? Is there some way to rename the variables in RR so the multiple sample_colors would not overwrite each other?
Hope I made myself clear
Greetings
|
|
|
from United States [214 posts] |
14 year
|
Hi Anders,
I believe you can use the Set_Variable module (found under the Variables group). So first add a Sample_Color module, then add a Set_Variable module right after it. In the Set_Variable module type in a variable name of your choice (e.g. CUBE_COLOR_1), then select the value from the drop down list on the left (e.g. [COLOR_SAMPLE]). Then add another Sample_Color module and Set_Variable module for CUBE_COLOR_2 and so on. There may be a more efficient way to do this but this should get the job done.
--patrick
http://www.pirobot.org
|
|
|
Anders from Norway [2 posts] |
14 year
|
Thank you, Patrick! It works like a dream :-)
Anders
|
|
|
from United States [214 posts] |
14 year
|
|