; ; CYBER TEXTURE Sequential Object Loader sample code for ; CYBER CONTROL. ; ; This program loads sequential objects created with CYBER ; TEXTURE (such as those that TWEEN or mapping an animation ; create) and animates them. ; The animation it creates is either static or it contains ; a moving point-of-view. The user is required to input the ; number of objects there are. Before running, be sure that ; the paths and filenames used by this program are correct ; for your system configuration. ; ; First we query the user. alert "CYBER TEXTURE|Sequential Object Loader|By Martin Doudoroff" @mark input "Static (0) or Moving Camera (1)?", inp1 if inp1 > 1 | inp1 < 0 then alert "Please input a 1 or 0":goto mark flag = inp1 @mark2 input "Number of objects to load? (1-20)", inp2 if inp2 < 1 | inp2 > 20 then goto mark2 ; Next we setup the camera & start the animation rstart "a:\texture",m:cam1 0,0,0:zoom 200:view s:draft ; Here's the loop for p = 1 to inp2 gosub loadobj if flag = 1 then gosub movecamera superview:record next p rstop:end ; Here's the movecamera subroutine @movecamera num=360/inp2 if p = 1 then return c1mv num,0,0 return ; Here's the loadobj subroutine @loadobj if p=1 then load3d "a:\testob00.3d2" if p=2 then load3d "a:\testob01.3d2" if p=3 then load3d "a:\testob02.3d2" if p=4 then load3d "a:\testob03.3d2" if p=5 then load3d "a:\testob04.3d2" if p=6 then load3d "a:\testob05.3d2" if p=7 then load3d "a:\testob06.3d2" if p=8 then load3d "a:\testob07.3d2" if p=9 then load3d "a:\testob08.3d2" if p=10 then load3d "a:\testob9.3d2" if p=11 then load3d "a:\testob10.3d2" if p=12 then load3d "a:\testob11.3d2" if p=13 then load3d "a:\testob12.3d2" if p=14 then load3d "a:\testob13.3d2" if p=15 then load3d "a:\testob14.3d2" if p=16 then load3d "a:\testob15.3d2" if p=17 then load3d "a:\testob16.3d2" if p=18 then load3d "a:\testob17.3d2" if p=19 then load3d "a:\testob18.3d2" if p=20 then load3d "a:\testob19.3d2" return