Bunch Identical functions with pairs of objects... HELP!!!

Discuss Lemur and share techniques.
Post Reply
johnman51
Newbie
Posts:3
Joined:13 Dec 2014 09:50
Bunch Identical functions with pairs of objects... HELP!!!

Post by johnman51 » 01 Apr 2017 14:14

Hello!

I really need help with my script...
I made a 149 Pads called "TR1, TR2, TR3, ......" and 149 faders called "F1", "F2", "F3", ......


I made a giant scripts that look like this: (My Execution depends on a specific expression)
if (TR1.x) F1.x = (F1.x-(1/254));
if (TR2.x) F2.x = (F2.x-(1/254));
if (TR3.x) F3.x = (F3.x-(1/254));
if (TR4.x) F4.x = (F4.x-(1/254));
if (TR5.x) F5.x = (F5.x-(1/254));
if (TR6.x) F6.x = (F6.x-(1/254));
if (TR7.x) F7.x = (F7.x-(1/254));
if (TR8.x) F8.x = (F8.x-(1/254));
if (TR9.x) F9.x = (F9.x-(1/254));
if (TR10.x) F10.x = (F10.x-(1/254));
if (TR10.x) F10.x = (F10.x-(1/254));
if (TR11.x) F11.x = ...............!!! until F149 !!!................ HELP!!!!

I'm sure there is a way to write it in shorter way but I'm really not good at this...
Is there someone to help me?

Best regards!
John.

phase_change
Regular
Posts:114
Joined:31 May 2015 18:45
Location:Austin, TX

Re: Bunch Identical functions with pairs of objects... HELP!

Post by phase_change » 03 Apr 2017 16:32

Use a for loop incrementing from 1 to 149
Have you tried turning it off and on again?

Post Reply