Hey, I'm at the begginning of making a 3rd person shooter or RPG, and I got the camera down and everything, but the animations won't work.
while ( LoopGDK ( ) )
{
//position camera
dbPositionCamera (dbObjectPositionX(1), dbObjectPositionY(1) + 5, dbObjectPositionZ(1));
//move camera backwards
dbMoveCamera(-10);
// move the player forwards
if ( dbKeyState(17) ) //W
dbMoveObject ( 1, -0.2 );
// move the player backwards
if ( dbKeyState(31) )//S
dbMoveObject ( 1, 0.2 );
// rotation
if(dbKeyState(30))//A
dbTurnObjectLeft(1, 1.8);
if(dbKeyState(32))//D
dbTurnObjectRight(1, 1.8);
//-----------------------------------------------------------------------------
if(dbKeyState(17) == 0 )//stand still
dbLoopObject(1,584,584);
if(dbKeyState(17) == 1 )//walk forward
dbLoopObject(1,596,620);
if(dbKeyState(30) == 1 && dbKeyState(17) == 0 )//move sideways-left
dbLoopObject(1,621,642);
dbSync ( );
}
The first animation, for walking when i press 'W' works fine, looks kind of glitchy, but I can fix it later, but when i try to hit 'A' to make the character do an animation to shuffle to the side, it only shows the first frame for it, and it was the same when I was testing how to crouch earlier (which wasn't a problem since the first frame was him crouching) until I tried to add this...
Can someone explain to me what's wrong, or give me the code, thanks,
-Wi1dcat Man