ValueAtTime only apllies to properties. If you take the value of the slider and add 1, it is an integer. Not a property anymore.

So if the slider is 2 at second 2 and 3 at second 3, you can ask what value it had at which second. But if you add something, let's say at second 2, asking valueAtTime then is like asking what value does 3 have at another second. 3 is 3. Does not change value. That is why you must add it at the last line, where first you ask how big is the slider at given time and then add the number.

If you really need the extra value to be taken into account in the w and not in the last line, you make 2 variables(w plus another one without the "+1"). And use the other one in the last line, then add one.

Andrei

My

Envato portfolio.