Originally Posted by SketchyNifflas' formula:
Angle = Abs(360*Min(Max(A.y - B.y)+1, 0), 1)-(ASin((B.x - A.x)/Sqr(A.x - B.x) pow 2 + (A.y - B.y) pow 2))+270))
Or, for a version that you can copy and paste straight into MMF (just rename Point A and Point B);
Angle = Abs(360*Min(Max(Y( "Point A" )-Y( "Point B" )+1, 0), 1)-(ASin((X( "Point B" )-X( "Point A" ))/Sqr((X( "Point A" )-X( "Point B" )) pow 2+((Y( "Point A" ))-Y( "Point B" )) pow 2))+270))
Like I said, it's very complicated. You can find this and other useful formulas are in my article "Useful Formulas".
set cam x to X( "player" )+(Cos(directionFromPlayer( "camera" ))
*Min(angleFromPlayer( "camera" ), 50))
set cam y to Y( "player" )-(Sin(directionFromPlayer( "camera" ))
*Min(angleFromPlayer( "camera" ), 50))
Shouldn't that be the distance from the player, rather than the angle? And also angle rather than the direction? (I thought directions were just 0-31?)
Actually, if you want to exactly replicate your original expression (the one that stopped working), shouldn't it be:
set cam x to X( "player" )+(Cos(angleFromPlayer( "camera" ))*LoopIndex("aim"))
set cam y to Y( "player" )-(Sin(angleFromPlayer( "camera" ))*LoopIndex("aim"))
?