Southsider
Landlubber
Good day vatos. I was trying to figure out how to create an object in a location. My code:
Then I call "LoadTestModel()" function and... nothing. Engine establish correct coordinates and correct object model, but the object is not visible on these coordinates. What could be the problem? Or am I doing something wrong?
Code:
object LoadObjectInLoc;
void LoadTestModel()
{
int n;
aref randItem;
aref al;
FindLocator("Havana_town", "patrol7", &al, true); // Find locator coordinates
n = Items_FindItem("blade7", &randItem); // Load object model and directory
Items_LoadModel(&LoadObjectInLoc, randItem); // Create an object
SendMessage(&LoadObjectInLoc, "lffffffffffff", MSG_MODEL_SET_POSITION, makeFloat(al.x), makeFloat(al.y), makeFloat(al.z), makeFloat(al.vx.x), makeFloat(al.vx.y), -makeFloat(al.vx.z), makeFloat(al.vy.x), makeFloat(al.vy.y), -makeFloat(al.vy.z), makeFloat(al.vz.x), makeFloat(al.vz.y), -makeFloat(al.vz.z)); // Set object position
Log_Info("Test loaded, Coords: " + makeInt(al.x) + " " + makeInt(al.y) + " " + makeInt(al.z) + ", Model: " + randItem.model);
}
Then I call "LoadTestModel()" function and... nothing. Engine establish correct coordinates and correct object model, but the object is not visible on these coordinates. What could be the problem? Or am I doing something wrong?