Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,089 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Load files from program directory- #331705
07/05/10 21:07
07/05/10 21:07
Joined: Jul 2008
Posts: 223
Pittsburgh
The_Clyde Offline OP
Member
The_Clyde  Offline OP
Member

Joined: Jul 2008
Posts: 223
Pittsburgh
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?

Re: Load files from program directory- [Re: The_Clyde] #331711
07/05/10 21:32
07/05/10 21:32
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
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

Re: Load files from program directory- [Re: Rei_Ayanami] #331712
07/05/10 21:35
07/05/10 21:35
Joined: Jul 2008
Posts: 223
Pittsburgh
The_Clyde Offline OP
Member
The_Clyde  Offline OP
Member

Joined: Jul 2008
Posts: 223
Pittsburgh
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...

Last edited by The_Clyde; 07/05/10 21:35.
Re: Load files from program directory- [Re: The_Clyde] #331771
07/06/10 07:39
07/06/10 07:39
Joined: Mar 2010
Posts: 14
Queensland, Australia
C
CoburnDomain Offline
Newbie
CoburnDomain  Offline
Newbie
C

Joined: Mar 2010
Posts: 14
Queensland, Australia
Maybe try

"..\models\model.mdl" to load stuff from the folder above?

Re: Load files from program directory- [Re: CoburnDomain] #331976
07/06/10 22:22
07/06/10 22:22
Joined: Jul 2008
Posts: 223
Pittsburgh
The_Clyde Offline OP
Member
The_Clyde  Offline OP
Member

Joined: Jul 2008
Posts: 223
Pittsburgh
Fixed it-

STRING* dir = str_create(work_dir);
str_cat(dir,"\\models");
add_folder(dir);


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1