It seems previous use of C# may have gotten me a little bit confused with how I'm attempting my if then statements.
What I am trying is the DarkGDK C++ equivalent of DBPro's
if Upkey() = 1 and walking = 0 then walking = 1
I should really look this up, but I don't have the time to delve into the depths of the internet looking for the solution. (As really I'm just gradually converting my DBP code over to DGDK)
What I did was:
if ( dbUpKey () )
{
if ( walking == 0)
walking = 1;
}
It runs, but the result isn't quite the same as I get in DBP:
I'll do the whole code if it helps:
DBP:
if upkey() = 1 and walking() = 0 then walking = 1
if walking# = 1 then loop object 1,5
if upkey() = 0 then loop object 1,1,1 : walking = 0
if upkey() =1 the move object 1,speed
DarkSDK:
if (dbUpKey () )
{
if (walking == 0 )
walking = 1;
}
if (dbUpkey ( ) )
dbMoveObject ( 1, -5 );
if (walking == 1)
dbLoopObject(1,5);
if (dbUpKey () == 0)
dbLoopObject (1,1,1);
if (dbUpKey () == 0)
walking = 0;
What I am doing is making the animation play as the player moves forward and the animation not to plat when its not moving forward. I DBP it works, in DarkGDK the models in stuck on one frame when walking (presumably the last frame) and a different frame when not (The first frame)
I love Nancy DrewG, but not insert brain here