[Solved] Is it possible to target a layer and set its properties both with variable values

Looking for something like this: layer(var1).opacity = var2