This command specifies the function to be called when certain commands are finished.
object.OnStopMovement = function
The function is called when movement of an object stops. The movement must have been caused by a command with a time parameter, such as the SetPosition , SetAngle , AddAngle , and Move commands.
The following code hides the sphere when motion stops.
oworld = New World(); ocamera = New Camera(oworld); sphere = oworld.CreateSphere(50,50,50,25,25); ocamera.MoveBack(1200); //Move the sphere. sphere.MoveLeft(200,5); Sphere.OnStopMovement = hideit; //Loop While(TRUE); function hideit //Hides the sphere when motion stops. { sphere.hide(); }