Thanks for answer sqiddster it should work but it's not :/
floor(choose(random(0,Last_Left_Angle-90)/90,random(Last_Left_Angle+90, 360)/90))*90
if Last_Left_Angle = 90
then choose(random(0,0)/90, random(180,360)/90)*90
- choose(0,[2 or 3 or 4])*90
- will give 0, 180, 270, 360 - correct
if Last_Left_Angle = 180
then choose(random(0,90)/90, random(270,360)/90)*90
- choose([0 or 1], [3 or 4])*90
- will give 0, 90, 270, 360 - correct
but sprites still are on the same angles :/