home *** CD-ROM | disk | FTP | other *** search
- `move.dba, a little utility for positioning .X objects...
- `use keys in the middle of the keyboard to move it:
- `T-Y moves object in and out
- `G-H moves object down and up
- `B-N moves object left and right
- `arrow keys rotate object x and y
- `Esc to exit.
- `The two numbers displayed are the x,y,(no z) for Rotate Object
- `The three numbers displayed are the x,y,z for Position Object
-
- sync on
- rem Load your object...
- load object "bmp\mouth.x",1
-
- xover#=0: ydown#=0 : zin#=0
- position object 1,xover#,ydown#,zin#
- x=2 : y=9
- rotate object 1,x,y,0
- set ambient light 100
- hide mouse
-
- do
- if leftkey() then inc y : rotate object 1,x,y,0
- if rightkey() then dec y : rotate object 1,x,y,0
- if upkey() then inc x : rotate object 1,x,y,0
- if downkey() then dec x : rotate object 1,x,y,0
-
- if y>359 then y=1
- if y<1 then y=359
- if x>359 then x=1
- if x<1 then x=359
-
- if keystate(48)=1 then xover#=xover#-.1
- if keystate(49)=1 then xover#=xover#+.1
- if keystate(34)=1 then ydown#=ydown#-.1
- if keystate(35)=1 then ydown#=ydown#+.1
- if keystate(20)=1 then zin#=zin#-.1
- if keystate(21)=1 then zin#=zin#+.1
-
- position object 1,xover#,ydown#,zin#
-
- text 0,0,str$(x)+", "+str$(y)
- text 0,20,str$(xover#)+", "+str$(ydown#)+", "+str$(zin#)
-
- sync
- while mouseclick()=1
- wait 1
- endwhile
- loop
-
- delete object 1
- end
-