Expression to pick one of six values based on slider
by James Archibald on Nov 11, 2014 at 11:34:54 am Last Edited By James Archibald on Nov 11, 2014 at 11:37:17 am
Hey everyone, this feels like it should be a simple one, and it's definitely something I've achieved before but I've sort of tangled myself up and can't quite see where to go.
I have a slider that is outputting a value between 1 and 6 based on a wiggle: w = wiggle(6,4);
I have 6 nulls in 3D space.
I then have my effect which I want to wiggle between these nulls based on the slider's "dice roll". So far I have defined my variables, but I can't think how to format the expression in order to achieve this.
This is how far I've gotten: dice = effect("Zap Roll")("Slider");
t1 = thisComp.layer("Edge Zap Target 1").transform.position;
t2 = thisComp.layer("Edge Zap Target 2").transform.position;
t3 = thisComp.layer("Edge Zap Target 3").transform.position;
t4 = thisComp.layer("Edge Zap Target 4").transform.position;
t5 = thisComp.layer("Pylon 1 - Top").transform.position;
t6 = thisComp.layer("Pylon 1 - Bot").transform.position;