+ System: Always (every tick)
-> sun: Set Y to clamp(.y,23,200)
-> Sprite: Set horizontal skew to [b](sun.y/70)[/b]*(Sprite.x-sun.x)
-> Sprite: Set height to [b]178[/b]-(Sprite.y-sun.y)
-> sun2: Set opacity to lerp(70,0[b],clamp((sun.y-100),0,100)/100[/b])
-> Sprite: Set opacity to lerp(70,10,[b]clamp((sun.y-100),0,100)/100[/b])
Nice, but i wonder how you come up with such things as "clamp((sun.y-100),0,100)/100". Why sun.y-100?
Also, i know you didn't write all this code, but why is the shadows height set to [b]178[/b] ? random value?
what about skew with sun.y /[b]70[/b]?
This is making my head spin... also, i suck at maths, and that really doesn't help me at all here lol
First question: with that clamp values devided by 100, you get a value from 0 to 1. This is needed to interpolate between 70 and 10. In result the opacity will be 70, if the suns y < 100, and 10, if the suns y > 200, in between 100 and 200 the opacity reduces from 70 to 10. sun.y = 200 happens to be the highest possible value, because it is clamped to [23, 200], so you could have used max((sun.y - 100), 0) instead of clamping as well.
Second question: Sprite.y = 191, suns lowest y is 23, 191-23 = 168. The value 178 was chosen to have a minimum height of 10.
Third question: I think, that's a decision based on the visuals. The goal is to let the shadows virtual origin seem to be the sun. I would have set this to (sun.y/23)*((Sprite.x-sun.x) / 2), so that when the sun is at its (visually) highest possible position, the factor would be 1.