it's simple.
POSITION CAMERA 0.0,0.0,-1000.0
rem Load 3D object and append walking data to it
LOAD OBJECT "idle.x",1 : APPEND OBJECT "run.x",1,20
YROTATE OBJECT 1,180 : FIX OBJECT PIVOT 1
rem Loop 3D object animation from 0 to 20 (idle)
LOOP OBJECT 1,0,20 : SET OBJECT SPEED 1,10
rem Activate manual syncronization
SYNC ON
rem Begin loop
DO
rem Modify character angle based on left/right keys
stage=0
IF LEFTKEY()=1 THEN a#=a#-2.0
IF RIGHTKEY()=1 THEN a#=a#+2.0
a#=wrapvalue(a#)
rem Modify character position based on up/down keys
IF UPKEY()=1 THEN x#=NEWXVALUE(x#,a#,1) : z#=NEWZVALUE(z#,a#,1) : stage=1
IF DOWNKEY()=1 THEN x#=NEWXVALUE(x#,a#,-1) : z#=NEWZVALUE(z#,a#,-1) : stage=1
rem If character action changes
IF stageoldstage
IF stage=0
SET OBJECT FRAME 1,0.0
LOOP OBJECT 1,0,20
SET OBJECT SPEED 1,10
ENDIF
IF stage=1
SET OBJECT FRAME 1,25.0
LOOP OBJECT 1,25,59
SET OBJECT SPEED 1,40
ENDIF
oldstage=stage
ENDIF
rem Update character position and angle
POSITION OBJECT 1,x#,0.0,z#
YROTATE OBJECT 1,a#
rem Refresh screen
SYNC
rem End loop
LOOP
yes yes yes
This is the code from the DBC 3D walking man tutorial, all I changed was the second file name to my running model(my idle animation is idle.x), the keyframe number on append object to the last keyframe of idle.x (20) and this part:
SET OBJECT FRAME 1,0.0
LOOP OBJECT 1,0,20
SET OBJECT SPEED 1,10
ENDIF
IF stage=1
SET OBJECT FRAME 1,25.0
LOOP OBJECT 1,25,59
SET OBJECT SPEED 1,40
ENDIF
that's all I changed! that's ALL! i swear! idle.x works just fine, he stands there and breathes... but then, when I try to move, it just plays the last frame of the idle.x model. so, that's the 411 on my PPD, help.... me....