loading
 
Using Arrays element as coordinate in Sample_Color
Greg Flolid from United States  [6 posts]
12 year
I would like to use Array elements as coordinates in the Sample_Color function but cannot get it to work.  Usually crashes, but does not work.

Used the following to define an array for the coordinates in the Sample_Color function:

Set Lane_0 = 161,212,256,219,178,306,113,297

I can   Display_Rectangle  using Lane_0 as a list


I want the Sample_Color function to use the elements of this
array as the coordinate.  Have not figured it out.

Cannot access the element as of yet for xy coordinates

Tried:  
[Lane_0:1]
[Lane_0(1)]
["Lane_0:1"]

None of these seem to work.    



 

program.robo
Anonymous 12 year
Greg,

The Set_Variable module did not know how to create an array. The Display_Rectangle module just knows how to deal with a string of X,Y coordinates. We've updated the Set_Variable module to have a IsArray checkbox that when checked will turn the comma separated value into an array. See attached robofile on how to then use it in the Sample Color module.

Please download 2.42.21 for this update.

STeven.
program.robo
Greg Flolid from United States  [6 posts] 12 year
Thanks for the great service!

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index