path_name

Gives the file name (including the path) of the last opened object file. Can be used to find the path of an entity, image, or sound file opened by a create function, or a file opened by file_load. If the file was found in a resource, path_name contains an empty string.

Type:

STRING*

Example:

ent_create("mymodel.mdl",vector(0,0,0),NULL);
if (!str_cmp("mymodel.mdl",path_name)) { diag("model loaded from subfolder!"); }

See also:

ent_create, file_load