Posted: 18th Jun 2007 1:33
Hi i have encountered 2 quite embarrassing problems,

One is i have a character made in MED, its an MD2 File, it uses a bone system for animation, it has frames, such as frame 1, frame 2, frame 3 etc

I have named them, stand1, stand2, stand3, walk1 etc etc
and when i try to get DBPro to play the frames or loop them.

another totally unrelated problem, well not such a problem i just cant seem to figure it out

basically this is the code i have

+ Code Snippet
   if keystate(17) then playerroty#=0
   if keystate(32) then playerroty#=90
   if keystate(31) then playerroty#=180
   if keystate(30) then playerroty#=270

where playerroty# is the yrotation

i tryed the obvious

if keystate(17+31) then playerrot#=45

But even before I ran it i kinda guessed it wouldn't work. any clues?
Posted: 18th Jun 2007 1:40
Ok, I think I see what your problem is. The keystate function is seperate for each individual key, and each key is just a number that represents each key. This means that you do not have to add up the keycode numbers to figure out mutiple keys. You would just do it like this:

If keystate(17) = 1 and keystate(31) = 1 then playerroty# = 45

I guess the =1's are optional, but I usually put them in there.

As for the MD2 file, I don't know a whole lot about them, I've only ever used .X files in darkbasic. My guess is that you can't set the object's frame using the names in the MD2 file because darkbasic only works with frame numbers.
Posted: 18th Jun 2007 1:51
it still isnt working, its just ignoring it, i did try that earlier
Posted: 18th Jun 2007 3:35
ok got it working, but how would i go about making it a bit smoother, so when my character turns he actualy turns on not just "magicly" face the other way?
Posted: 18th Jun 2007 20:26
curvevalue is your friend there...