Load files from program directory-

Posted By: The_Clyde

Load files from program directory- - 07/05/10 21:07

I'm having trouble with the editor I am working on-

ent_create can load models from the same directory as the level file that has been loaded, but apparently not the original program directory.

How do I fix it so that I can also load the models in the same directory as the application?
Posted By: Rei_Ayanami

Re: Load files from program directory- - 07/05/10 21:32

can't you use a path in the name of the entity you want to create?

%EXE_DIR%\models\yourmodel.mdl

as an example - not tried
Posted By: The_Clyde

Re: Load files from program directory- - 07/05/10 21:35

Doesn't work- it seems like %EXE_DIR% is in relation to the level file that's been loaded instead of the actual program file...
Posted By: CoburnDomain

Re: Load files from program directory- - 07/06/10 07:39

Maybe try

"..\models\model.mdl" to load stuff from the folder above?
Posted By: The_Clyde

Re: Load files from program directory- - 07/06/10 22:22

Fixed it-

STRING* dir = str_create(work_dir);
str_cat(dir,"\\models");
add_folder(dir);
© 2024 lite-C Forums