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.

Sample Code

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();   } 

Elementary Game Programming and Simulators Using Jamagic
Elementary Game Programming & Simulations Using Jamagic (Charles River Media Game Development)
ISBN: 1584502614
EAN: 2147483647
Year: 2002
Pages: 105
Authors: Sergio Perez

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net