-
Assing value to slider through expressions
Hello everyone!
I’m very new to expressions, so please excuse if this is a stupid question.
I need to have a varibal that updatates automaticly based on its layers position in the comp. So e.G.:.
.
.
LayerIndex 1 : Var NewX = 5
LayerIndex 2 : Var NewX = 4
LayerIndex 3 : Var NewX = 3
LayerIndex 4 : Var NewX = 2
LayerIndex 5 : Var NewX = 1I read somewhere that I can’t just access NewX of the layer below call it PrevX, add 1 and call it NewX again. So I tried to work around that and tried this with a slider control;
PrevX = thisComp.layer(Index-1).effect(“Einstellungen für Schieberegler”)(“Schieberegler”); /*this is just German for
slidercontrol (slider of
the layer below) */
NewX = PrevX + 1;
effect(“Einstellungen für Schieberegler”)(“Schieberegler”).value = NewX; /* Slider of current layerThis doesn’t produces any errors but the slider of the NewX Layer doesn’t update. I hope my explanation isn’t to confusing and sorry for any errors. English is not my first language.
I’m thankful for any help!
Adrian