I'm new to maxscript and I managed to make this little script to attach every selected objects together.
objArr = for i in $ collect i mainObj = objArr count = objArr.count undo off( convertTo objArr Editable_Poly for i = 2 to count do ( polyOp.attach mainObj objArr[i] ) )
I used google a lot to make this first script and I don't quite understand that part:
objArr = for i in $ collect i
if I used only $ instead to select my objects, only one object on 2 was attached...
Can someone please help me understand why it was doing that and what this for loop does exactly?