Wait for Frame or Time (Animation Script)

Wait for frame momentarily stops running animation script and renders a specified number of frames.  After frames are rendered animation script continues.  Wait for frames are added after transformation instructions to named objects/surfaces from the scene to show animation effects. 

Wait for time stops running animation script until a set amount of time has elapsed, after which animation script continues.

Wait for frame/time can be used to delay animation until a number of frames have been rendered or a specified time has elapsed.

Parameter Modifiers
( - ) Use negative value for loop/conditional parameter

float - Scalar floating point constant or VERTEX variable component (.x/.y/.z)

Wait for Frame Description and parameter type variations

Waits for a specified number of frames to render before continuing animation script

Waits for 1 frame to render before continuing

Wait(float NumberOfFrames)
Waits for specified number of frames to render before continuing
NumberOfFrames parameter is rounded down to nearest integer value
if NumberOfFrames parameter is <=0 no frame wait occurs

abbreviated Wait for 1 frame ';' semicolon character at end of code line containing a transformation instruction that applies to a named object/surface from the scene waits for 1 frame

Rectangle.Rotate(1, 0, 0);
Rotates named object 'Rectangle' 1 degree around X axis and waits for 1 frame.

Equivalent to,
Rectangle.Rotate(1, 0, 0)

Functions that allow abbreviated ';' frame wait at end of code line

Named Objects

Named Surfaces

View Functions

WaitTime Waits for a specified time in seconds before continuing animation script

WaitTime(float Seconds)
Waits for time in seconds before continuing
if Seconds parameter <= 0 no time wait occurs


Named Objects in example, Cylinder, Rectangle
Named Surface in example, RectTop
VERTEX Rotation, WaitForFrameCount

Cylinder.TranslateV(RectTop, 20)
//Wait for 10 seconds before continuing

Rotation.Set(0, 1.5, 0)

    //Rotate named object 'Cylinder' and 'Rectangle' then Wait for 1 frame to render before continuing
    Rectangle.Rotate(Rotation, Cylinder); 

WaitForFrameCount.Set(5, 0, 0)
Rectangle.Rotate(0, 0, -30)
//Wait a specified number of frames using a variable value

Synchronized Frame Wait

When running multiple animations scripts each animation will run until a Wait instruction is encountered (or the script ends).  At this time a frame will render and all animations will continue until next Wait instruction in encountered.

Example of Wait for frame between 2 animation scripts running

Rectangle.Translate(50, -25, 0)
Cylinder.RotateV(RectTop, 45)
//Animation stops running at this point to Wait for frame, at same time 2nd animation //shown on right will run until Wait instruction.  When a Wait is encountered for both //animations a frame will be rendered.  Since there is a Wait(2) this animation will not //proceed until after another iteration of the Repeat loop in the 2nd animation.

Rectangle.Rotate(0, 2.5, 0)
//At this time 3 iterations of Repeat loop from the 2nd animation on right would have //run.

//Animation ends while 2nd animation continues rendering a frame for each iteration  //of Repeat loop
    Rectangle.Rotate(0, 0, -0.5)
    //Animation stops running to Wait for frame for each iteration of Repeat loop