If you wanted to exit from the function, then you could be looking for "ExitFunction".
I suppose all my ideas have been shown already. But this is what I'd do:
sync rate 0 : sync on
make object cube 1,10
do
inc ang
yrotate object 1,wrapvalue(ang)
if returnkey()=1 then Pause()
center text 320,240,"Press enter to pause"
sync
loop
Function Pause()
` Get rid of any 3D so we can use 2D
set camera view 0,0,0,0
do
inc i
cls rgb(127 + sin(i)*127,0,0)
center text 320,240,"Press space to return"
if spacekey()=1 then exit
sync
loop
set camera view 0,0,screen width(),screen height()
EndFunction
You are the
th person to view this signature.
Programmers don't die, they just
Gosub without
return....