Oh, nooooo...I did the same thing you all are doing! X != MD2.
.x animations are individual files. Here is code for a DarkMatter model.
#constant NULLSTR = ""
#constant TRUE = 1
#constant FALSE = 0
#constant ILLEGAL_VALUE = -1
#constant FIRST_PERSON_VIEW = 0
#constant THIRD_PERSON_VIEW = 1
#constant MAX_TRACK = 10
#constant FPS_TARGETX2 = 100
#constant MAX_FOV = 120
#constant MD2_MODEL = 0
#constant MD3_MODEL = 1
#constant X_MODEL = 2
#constant DARK_MATTER = 6
#constant DMstatic = 0
#constant DMidle = 1
#constant DMmove = 2
#constant DMattack1 = 3
#constant DMimpact = 4
#constant DMdie = 5
#constant USE_BSP = 0
#constant USE_X = 1
dim DM_AnimsPeople$(6) as string
DM_AnimsPeople$(0) = "Static.x"
DM_AnimsPeople$(1) = "Idle.x"
DM_AnimsPeople$(2) = "Move.x"
DM_AnimsPeople$(3) = "Attack1.x"
DM_AnimsPeople$(4) = "Impact.x"
DM_AnimsPeople$(5) = "Die.x"
type posit
x as float
y as float
z as float
endtype
type player
name as string
view as integer
sound as integer
modelType as integer
modelName as string
model as integer
skinname as string
skin as integer
weaponName as string
weapon as integer
weaponSkinName as string
weaponSkin as integer
bModelLoaded as boolean
bWeaponLoaded as boolean
move_unit as float
animation as integer
nextanimation as integer
bFiring as boolean
bJumping as boolean
bCrouching as boolean
bWalking as boolean
bRunning as boolean
position as posit
endtype
type DMPlayer
idle as integer
move as integer
attack1 as integer
impact as integer
die as integer
HI as player
endtype
global player1 as DMplayer
player1.HI.name = "jinzai"
player1.HI.view = THIRD_PERSON_VIEW
player1.HI.sound = ILLEGAL_VALUE
player1.HI.modelName = "models/German/H-German-"
player1.HI.model = ILLEGAL_VALUE
player1.HI.skinName = ""
player1.HI.skin = ILLEGAL_VALUE
player1.HI.bModelLoaded = FALSE
player1.HI.weaponName = ""
player1.HI.weapon = ILLEGAL_VALUE
player1.HI.weaponSkinName = ""
player1.HI.weaponSkin = ILLEGAL_VALUE
player1.HI.bWeaponLoaded = FALSE
player1.HI.move_unit = 0.16
player1.HI.animation = ILLEGAL_VALUE
player1.HI.nextanimation = ILLEGAL_VALUE
player1.HI.bFiring = FALSE
player1.HI.bJumping = FALSE
player1.HI.bCrouching = FALSE
player1.HI.bWalking = FALSE
player1.HI.bRunning = FALSE
player1.HI.model = jzGetNextAvailableObjectID(1)
player1.HI.bModelLoaded = LoadModel(player1.HI.modelName + DM_AnimsPeople$(0), player1.HI.model)
if player1.HI.bModelLoaded = TRUE
rotate object player1.HI.model, 0, 180, 0
fix object pivot player1.HI.model
for i = 0 to 5
append object player1.HI.modelName + DM_AnimsPeople$(i), player1.HI.model, total object frames(player1.HI.model) + 1
select i
case 0
player1.idle = total object frames(player1.HI.model)
endcase
case 1
player1.move = total object frames(player1.HI.model)
endcase
case 2
player1.attack1 = total object frames(player1.HI.model)
endcase
case 3
player1.impact = total object frames(player1.hi.model)
endcase
case 4
player1.die = total object frames(player1.HI.model)
endcase
case default
break
endcase
endselect
next i
scale object player1.HI.model, 100, 100, 100
set object player1.HI.model, 1, 1, 1, 2, 0, 0, 0
set object smoothing player1.HI.model, 100
player1.HI.sound = mp3player + 1
player1.HI.position.x = 27
player1.HI.position.y = 1
player1.HI.position.z = 13
set object speed player1.HI.model, 24
loop object player1.HI.model, player1.idle, player1.impact
else
exit
endif
.
.
.
function jzGetNextAvailableObjectID(seed as integer)
local temp = seed
if seed < 1 then exitfunction -1
do
if object exist(temp) = 0 then exitfunction temp
inc temp
if temp < 1 then exitfunction -1
loop
endfunction -1
function LoadModel(modelName$ as string, objID as integer)
cls
sync : center text mid_x, mid_y, "LOADING " + modelName$ : sync
load object modelName$, objID, 1, 0
endfunction 1
Okay, that was alot...I hope that everything is there...I know there is more than you need to load and animate.