Gamestudio Links
Zorro Links
Newest Posts
Max Number of Strategies in /Strategy folder
by Martin_HH. 08/15/26 09:47
Pause button for evaluation shell?
by AndrewAMD. 08/13/26 17:16
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/10/26 12:46
phantom() not defined in indicators.c
by jcl. 08/07/26 11:45
Accepting new programming clients
by AndrewAMD. 08/06/26 21:25
Fun Arcade Car Physics (nfs style)
by Ezzett. 08/02/26 21:11
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (1 invisible), 4,712 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LapHoan, ZeonLau, Ponti233, riggi89, shuhari
19230 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 | 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