If the object is not on screen, there is no shake. But if it is, start a cam shake that will growing as the char moves closer to this object.
I have this math that I'm using in the cam:
If 'Object' is on screen,
Set the Cam shake to: clamp(distance(Char.X,Char.Y,Object.X,Object.Y)/190,5,1)
It works, but is inverted. When the object is closer to the Char, the shaking magnitude is 1 instead of 5.
How can I invert this?