home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 20
/
af020.adf
/
Script4D
/
eyeeye.prog
< prev
next >
Wrap
Text File
|
1980-02-23
|
2KB
|
102 lines
FRAMES 50
/* define a 7-step smooth motion for 0 thru 90 degrees */
SMOOTHER blinking 0 90 7
/* bounce up/down motion in 11 steps */
SMOOTHER bouncing 0 -2000 11
TO init
EXECUTE
'LOAD TAKE "EYE.TAKE" '
'COORDINATES 0'
SUSPEND init 32000 /* init suspended for 32000 frames! */
END
END
TO getscene /* gets base scene for each frame */
EXECUTE
'TAKE CURRENT FRAME %d' (i) frame
'ERASE ALL'
'(0,0,0)'
'LOAD SCENE "Eyeeye.scene"'
END
END
TO blink /* how to make the eye blink */
SETUP
blinkstep = 2 /* 2 because 1st angle would be 0 */
closingtime = 0
END
EXECUTE
/* select next angle for smooth motion */
blinkangle @= blinking blinkstep /* alternative to SMOOTH */
'DESELECT ALL' /* output script commands to.. */
'SELECT NAMED "Eye+Lid"' /* ..rotate eyelid */
'WINDOW EAST'
'ROTATE CLOCKWISE %d' (i) blinkangle
IF blinkstep = 7 /* handle eye-closed time */
FREEZE closingtime
ENDIF
blinkstep += 1 /* ready for next frame */
IF blinkstep > 12
SUSPEND blink 32000
ENDIF
END
END
TO bounce /* bouncing up & down */
SETUP bouncestep = 1 END
EXECUTE
bouncelevel @= bouncing bouncestep
'SELECT ALL'
'GRABBER ON'
'[0,0,%d]' (i) bouncelevel
'GRABBER OFF'
IF bouncestep = 6
bouncestep += 11 /* going up! */
ELSE
bouncestep += 1
ENDIF
IF bouncestep = 21
bouncestep = 1 /* going down */
ENDIF
END
END
TO savescene /* saves scene & makes key frame */
EXECUTE
'TAKE KEY YES'
'TAKE SAVE KEY FRAME SCENE'
END
END
TO render /* final script command */
EXECUTE
'TAKE PREVIEW' /* OR 'TAKE RENDER ALL' */
END
END
AT 1 /* before anything else.. */
START init /* start once-off init */
START getscene /* start scene load.. */
START savescene /* ..and save procedures */
START bounce /* bouncing all the time */
END
AT 50 /* when all scenes generated.. */
START render
END
AT 5 /* what to do at frame 5 */
START blink /* set it rolling */
END
AT 25 /* what to do at frame 18 */
START blink /* longer blink this time.. */
closingtime = 7 /* ..by overriding default */
END
END