Page 1 of 1

Resizing by script

Posted: 07 Jun 2013 14:05
by amundsen
Hello,

I have a series of MultiBall I want to resize on their height axis.

I am trying this script :

Code: Select all

decl i, current,name;
for (i = 1;i < 27 ;i++) {
	name = 'MultiBall'+arraytostring({i});
	current = getattribute(name, 'rect');
   set(current,128,3);
	setattribute(name,'rect',current);
}
However it does not seem to work. What 's wrong ?

Re: Resizing by script

Posted: 07 Jun 2013 14:14
by Softcore
Unfortunately you cant combine string characters like that......

Your best bet would be to create an expression with all the Multiball object names in it

for example

name= {Multiball, Multiball1, Multiball2........Multiball27};

and then use name inside the i iterations loop.