View Full Version : Index question
Rivendale 09-29-2004, 01:21 AM Hi, I need help with this...I have a selection (of 1 edge) that is included in an array. How do I select the next item in the arrays index?
I know how to select the first one in the index with [1], but I need to know what[?] the selection I have is within the index...and get the next number in the index
I hope you understand and any help is appreciated.
CML
|
|
DentonVanZan
09-29-2004, 03:11 AM
hey dude, if you want to get the second one, get it with loops, like:
arr = #(1, 3, 10)
for i = 1 to arr.count do
(
arr[i]
)
but if you want to get the next edge based on position, then it is not that easy man, at least not with 1 function.
See ya
LFShade
09-29-2004, 10:59 AM
findItem <array> <value> will return the index of the first item in <array> which matches <value>.
RH
Rivendale
09-29-2004, 03:05 PM
LFShade- Thanks man that solved some things, really appreciate it!
and thanks DentonVanZan.
CML
externe
09-29-2004, 03:57 PM
nice stuff with array is for in loop
arr = #(1,2,3,4,5)
for act in arr do
(
print act
)
-- output 1
-- output 2
-- output 3
-- output 4
-- output 5
DentonVanZan
09-29-2004, 07:05 PM
yeah externe for loops rock.
See ya
CGTalk Moderation
01-19-2006, 10:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.