For the record, it is not hard to do animation in DB, it is time consumeing though, you have to try alot of things out to get where you need to go, I have unfortunatly got rid of alot of anims I made that I wasn't using or hadn't used for a while, here is the only one I have left which relates to a worm moving, the worm consists of a head and 11 body segments and 2 eye's, all the animation does is hunch the back (more like a catapilar movement really but hey it's a game..) and then unhunch it again, returning to the original position ( lying flat.) it is effective enough for the worms basic move and should give some idea how to do small anims with DB, All you do is load the object, position it and set the objects pivot, the pivot means that all work you do on the object (work= calls to position limbs) is related to the poss it has once this commands used.., the codes pretty easy to understand ( I think ) so I will post the model loading and setting parts, the animation it self and how I use this in the main loop, I hope it helps clear up how to animate in DB, this is for DB v1 though I am yet to try it in DBP as I am waiting on patch 4 for the new object handling system, I think the objects report weird limb numbers back at present (they have so far when I have tried..) so it would be unwise to bother to much in DBP, this all works fine in DB v1 though. any probs or further help required in this area, I am happy to help where I can but I really am not brilliant with it..
` Load worm, set it's properties, rotate to correct angle, fix it's position
Load Object "Worm1.3ds",1
set object 1,1,1,1,1,1,1,1
yrotate object 1,180
fix object pivot 1
position object 1,0,5,0
` Worm Limbs as follows : 1=Head, 2 to 12=body segments, 13=right-eye, 14=left-eye
` clear worm of any keyframes of animation
clear all object keyframes 1
` Set Keyframe 1 at original position
set object keyframe 1,0
` Begin movement sequence (peak of the move)
offset limb 1,1,0,3,5
scale limb 1,2,100,100,100 : offset limb 1,2,0,2,-0
scale limb 1,3,115,115,115 : offset limb 1,3,0,4,-2
scale limb 1,4,120,120,120 : offset limb 1,4,0,6,-4
scale limb 1,5,125,125,125 : offset limb 1,5,0,8,-6
scale limb 1,6,130,130,130 : offset limb 1,6,0,10,-8
scale limb 1,7,120,120,120 : offset limb 1,7,0,8,-10
scale limb 1,8,110,110,110 : offset limb 1,8,0,6,-12
scale limb 1,9,100,100,100 : offset limb 1,9,0,4,-14
scale limb 1,10,90,90,90 : offset limb 1,10,0,2,-16
scale limb 1,11,70,70,70 : offset limb 1,11,0,1,-18
scale limb 1,12,50,50,50 : offset limb 1,12,0,0,-20
offset limb 1,13,0,3,5
offset limb 1,14,0,3,5
` Setting the key frame here forces the program to
`calcualte the exact movements of each limb between frame 1 `and 6 at even intervales
set object keyframe 1,6
`end the sequence (return to original position)
offset limb 1,1,0,0,0
scale limb 1,2,100,100,100 : offset limb 1,2,0,0,0
scale limb 1,3,100,100,100 : offset limb 1,3,0,0,0
scale limb 1,4,100,100,100 : offset limb 1,4,0,0,0
scale limb 1,5,100,100,100 : offset limb 1,5,0,0,0
scale limb 1,6,100,100,100 : offset limb 1,6,0,0,0
scale limb 1,7,100,100,100 : offset limb 1,7,0,0,0
scale limb 1,8,100,100,100 : offset limb 1,8,0,0,0
scale limb 1,9,100,100,100 : offset limb 1,9,0,0,0
scale limb 1,10,100,100,100 : offset limb 1,10,0,0,0
scale limb 1,11,100,100,100 : offset limb 1,11,0,0,0
scale limb 1,12,100,100,100 : offset limb 1,12,0,0,0
offset limb 1,13,0,0,0
offset limb 1,14,0,0,0
set object keyframe 1,10
` Here is a seperate lable that controls the player/worm movement, this is called normally through a do/loop sequence amongst other things..
wormmove:
if upkey()>0
gosub sound
if sound Playing(1)=0 then Play sound 1
if object playing(1)=0 then play object 1,0,10
move object 1,2
gosub camera
endif
if object playing(1)=0 then stop object 1
if leftkey()=1 then yrotate object 1,wrapvalue(object angle y(1)-1)
if rightkey()=1 then yrotate object 1,wrapvalue(object angle y(1)+1)
return
I hope this is not to messy to understand.. good luck.
1ghz Cel,512 sdram 133,Gf2 MX 400 64,SBL 5.1,Win98
Best Upcoming MMOG - http://WWW.Atriarch.com
Project: Card Game with No Name