assuming i remember correctly the rotation value is based on the frame rate so telling something to rotate by 60 will rotate 1 degree if your game is running at 60fps (0.5 if running at 30fps, 2degrees if running at 120fps etc).
so from this logic we know that we can rotate something a set amount by using a variable like so
if ry < 90 then
ry = ry + 1
RotateY(e,60)
end
but this will only work if the fps stays at exactly 60 and will take 90 seconds.
so you can improve the speed by making it rotate to the desired value instantly like so
target_angle = 90
if ry < target_angle then
ry = ry + target_angle
RotateY(e,60*target_angle)
end
now you'll likely want to improve this more by making sure your FPS is correct as it's very unlikely to be a flat 60fps at all times.
if GetTimer(e) < 1000 then
fpsx = fpsx + 1
else
fps = fpsx
fpsx = 0
StartTimer(e)
end
if fps > 0 then
target_angle = 90
if ry < target_angle then
ry = ry + target_angle
RotateY(e,fps*target_angle)
end
end
for rotating in anticlockwise you simply give a negative value as the amount to rotate by
RotateY(e,(fps*target_angle)*-1)
p.s. you will need to turn collision off to rotate correctly and also make sure any variables are defined outside of the main loop first to ensure they start at 0 etc.
an easier and more accurate method is to simply use the SetRotation command but this rotates around the global axis and not the object's local axis (so only fine if you haven't rotated the object away from those - i.e. up for the object is up for the game world).
target_angle = 90
if ry < target_angle then
ry = ry + target_angle
SetRotation(e,g_Entity[e]['anglex'],g_Entity[e]['angley']+target_angle,g_Entity[e]['anglez'])
end