Hi,
I am relatively new to Dark Game SDK, and thus far im pretty impressed with what I have been able to do in a very short development time. I have come up against a problem, whic I can not see a solution to in any documentation.
I was making a simple editor for my game, and wanted to be able to load a "location" file (.x) by selecting from a menu. To cut a long story very short, is there a problem with calling dbLoadObject from within the game loop (LoopSDK).
Outside the game loop my code works fine, but when called from within no object is displayed, anda call to dbObjectExist returns 0.
A subset of my code with hardcoded values is below:
while (LoopSDK()) {
if (dbEscapeKey() || Exit)
return;
if(m_bUpdateLocation){
dbSetDir ( "Path_to_moels_directory" );
dbLoadObject("model.x", LOCATION_NUMBER);
dbPositionObject(LOCATION_NUMBER, 0, 0, 0);
dbScaleObject(LOCATION_NUMBER , 10, 10, 10);
int i = dbObjectExist(LOCATION_NUMBER);
m_bUpdateLocation = false;
}
m_camera.update();
dbSync();
}
So, am I being daft, is this impossible in Dark Game (if so, any suggestions on how best to load an object at runtime greatfully received).
Many Thanks, Mark