Hopefully this will help. There is still a slight problem where it may be possible for player to go round in circles round target waypoint if turning angle is not enough. Hopefully you can sort this out fairly simply.
sync on : sync rate 0 : randomize timer()
null2=make vector2(1)
#constant player = 1
#constant turnangle = 3.0
#constant waypoints_count = 10
#constant waypoints_distance=50
make object cube player,10
color object player,rgb(255,0,0)
position object player,0,0,0
rem create some random waypoints
for f=1 to waypoints_count
make object sphere f+1,10
for g=1 to 1000
x#=rnd(200) : z#=rnd(200) : m#=99999
if f > 1
for h=1 to (f-1)
d#=range2D(x#,z#,object position x(h+1),object position z(h+1))
if d# < m# then m#=d#
next h
endif
if m# > waypoints_distance then exit
next g
position object f+1,x#,0,z#
next f
position camera 100,200,100 : pitch camera down 90
w=1
do
d#=range2D(object position x(player),object position z(player),object position x(w+1),object position z(w+1))
if d# < 10
inc w : if w > waypoints_count then w=1
endif
a#=bearing(player,w+1)
move object player,2
if a# >= 0
if a# >= turnangle then a#=turnangle
yrotate object player,wrapvalue(object angle y(player)+a#)
else
a#=-a#
if a# >= turnangle then a#=turnangle
yrotate object player,wrapvalue(object angle y(player)-a#)
endif
for f=1 to waypoints_count
x=object screen x(f+1) : y=object screen y(f+1)
center text x,y-25,str$(f)
next f
text 0,0,"Heading for waypoint " + str$(w)
sync
loop
function bearing(o1,o2)
a#=atanfull(object position x(o2)-object position x(o1),object position z(o2)-object position z(o1))
b#=-wrapvalue(object angle y(o1)-a#)
if b# < -180 then b#=360.0+b#
endfunction b#
function range2D(ax#,az#,bx#,bz#)
set vector2 1,ax#-bx#,az#-bz# : result#=length vector2(1)
endfunction result#
Boo!