how to make array and select this after cloning

hi, can anyone help me with this, its very simple, i simply want to select the clones after script has run,
select mycyl does not work, and i have tried others stuff as well (also reading anubis array tutorial), i still cant get it, and cannot find help in maxscript documentation

isnt mycyl already an array, or if not, how do i make this one, and then how do i select this array?

thanks for your help!

on btndo pressed Do (sel = getCurrentSelection()
sf = sel
if (Clone.state == 1) then(
c=objCount.value
for i=1 to c do (
mycyl = copy sf
)
)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Budi G's picture

ok sorry, I have edited and

ok sorry, I have edited and put it together with your script :)

on btndo pressed Do 
(-- start btndo
   sel = getCurrentSelection()
   sf = sel
   obj_copy=#() -- empty array
----------------------
  if (Clone.state == 1) then
  (
    c=objCount.value
    for i=1 to c do 
    (
      mycyl = copy sf
      append obj_copy mycyl -- append
    )
  )
----------------------
 select obj_copy -- select copy array colection only
 --selectmore obj_copy -- select copy array colection with original selection
)-- end btndo
Budi G's picture

on btndo pressed

on btndo pressed Do
(
obj_copy=#() ---make empty array colection
----------------------
-- put here the other scripts
for i=1 to c do 
(    
  mycyl = copy sf -- copy the object
  append obj_copy mycyl -- this add new object into obj_copy colection
)
 
----------------------
select obj_copy --- select array colection after looping
)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.