First, you need the pointer to the entity. For this, we'll say the pointer is "you".
Then, it's as simple as:
you.x - you.y - you.z
or
you.pan - you.tilt - you.roll
Here's an example for saving to a file
Code:
string xmlFile = "whatever.XML";
var xmlHandle;
Function saveObject(fHandle, ent)
{
file_var_write(fHandle, ent.x);
file_var_write(fHandle, ent.y);
file_var_write(fHandle, ent.z);
file_var_write(fHandle, ent.pan);
file_var_write(fHandle, ent.tilt);
file_var_write(fHandle, ent.roll);
}
Function saveEntities()
{
xmlHandle = file_open_write(xmlFile);
//
var i = 0;
you = ent_next(i);
while(you)
{
saveObject(you)
you = ent_next(you);
}
//
file_close(xmlHandle);
}
Call
saveEntities() to save all of the entities in your level to a file. It won't save them with the XML format, so the extension on your filename doesn't really matter...
good luck, hope I helped...