[code]lerp(a,b,p) = a + (b - a) * p[/code]So in short if you imagine a and b being a start and end of a linear path, p is the percentage travelled.
Also dt is the time in second spent between two frames
so dt varies slightly but stay around 0.017 (1/60 fps) so 0.5*dt is more or less constant.
The only thing you really change is scrollVar which is always random.
What you probably want to do is having a fixed point, and a variable offset. The variation would be random, but the range of the randomness would decrease in time.
So it should look like[code]Every tick
-> set range to max(0,range - 0.5*dt)
-> set xOffset to random(-range,range)
-> set scroll X to xFix + xOffset[/code]This way you just have to change range to trigger the shaking