Okay so I believe I have bit off more than I can chew. This code is a project of mine I am working on (if you must know a WW2 RTS) that uses FPSC x9 maps. Well here is my problem. I am using DarkMATTER 1 for some of the character models. In this case, the enemy (German). I have a set of functions (included). Well as you know, DM's animations aren't in just one model. So I have to load up all of the models that go with the character. Well, I am trying to load them within the functions, delete the old one, and place the new animation with the same object number as the old one. Well it goes all fine and well actually! Deletes the old one (object 2 per say), creates the new one as object 2, but I have one problem. The FPS slows down to like 4 and just stays there. I figured it is within my coding seeming as the models aren't high poly. Can you see what I am doing and please correct me? The source is below.
Rem Project: WW2 RTS
Rem Created by: Zeus
Rem Created: Wednesday, November 24, 2010
set dir "Files"
autocam off
type EnemyData
x as float
y as float
z as float
objno as float
endtype
dim EnemyDAT(500) as EnemyData
LoadMap(1)
load image "enemybank\German\german.dds",2
global DESTZ
global UnSafeToSet
MakeEnemy(2,465,500,0)
backdrop on
sync rate 60
do
set cursor 0,0
print "FPS: ",screen fps()
print EnemyDAT(1).x
print object position y(2)
print object position z(2)
MoveEnemy(2,-540)
if UnSafeToSet = 0
print "Loaded..."
SetEnemyToIdle(2,465,500,-540)
endif
center text screen width()/2,740,"AWEngine ALPHA - Environment & Soldier Testing Stage A"
loop
function LoadMap(m as integer) `This function contains all of the maps.
if m = 1 `This map is Verschlungen Dorf.
load image "skybank\verschlungen_dorf\valley dawn.jpg",1
texture backdrop 1
fog on
load object "levelbank\verschlungen_dorf\universe.dbo",1
sc_setupComplexObject 1,1,2
position camera 668,805,-1775
endif
endfunction m
function MakeEnemy(obj as integer,x as integer,y as integer,z as integer)
load object "enemybank\German\H-German-Move.x",obj
position object obj,x,y,z
scale object obj,5000,5000,5000
texture object obj,2
loop object obj,10
set object speed obj,50
EnemyDAT(obj).x = object position x(2)
EnemyDAT(obj).y = object position y(2)
EnemyDAT(obj).z = DESTZ
EnemyDAT(obj).objno = 2
endfunction
function MoveEnemy(obj as integer,DESTZ as integer)
enemySetToMove = 1
if object position z(obj) > DESTZ
objx = object position x(obj)
objy = object position y(obj)
move object obj,-3
stopped = 0
UnSafeToSet = 1
endif
if object position z(obj) < DESTZ
position object obj,objx,objy,DESTZ
UnSafeToSet = 1
endif
if object position z(obj) = DESTZ and stopped = 0
stopped = 1
stop object obj
UnSafeToSet = 0
endif
endfunction
function SetEnemyToIdle(obj as integer,x as integer,y as integer,z as integer)
delete object obj
load object "enemybank/German/H-German-Idle.X",obj
position object obj,x,y,z
scale object obj,5000,5000,5000
texture object obj,2
loop object obj,10
set object speed obj,50
endfunction
function EnemyAttackModeOn(obj as integer,x as integer,y as integer,z as integer)
`Nothing here yet.
endfunction
Thank you!

Zeus