Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 677 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Setting up script paths/pragma path #459113
04/22/16 18:34
04/22/16 18:34
Joined: Apr 2016
Posts: 1
T
theraygun Offline OP
Guest
theraygun  Offline OP
Guest
T

Joined: Apr 2016
Posts: 1
Hello. I am confused with WHERE to put my work in 3DGS. Here is my current directory structure, program is in C:\Program Files\GStudio8. So, for a generic example, I made a folder called "shooter" in \work folder of game folder i.e.C:\Program Files\GStudio8\work\shooter.

This is the script:

#include <acknex.h>
#include <default.c>
#include "t_player.h" // player's movement / camera code
#include "t_weapons.h" // player's weapons: pistol, machine gun with autofire and sniper gun, ammo packs, health pack, armor pack
#include "t_enemies.h" // player's enemies
#include "t_elevators.h" // elevators and platforms
#include "t_doors.h" // doors and keys

#define PRAGMA_PATH "%EXE_DIR%\\templates\\code";
#define PRAGMA_PATH "%EXE_DIR%\\templates\\images";
#define PRAGMA_PATH "%EXE_DIR%\\templates\\levels";
#define PRAGMA_PATH "%EXE_DIR%\\templates\\models";
#define PRAGMA_PATH "%EXE_DIR%\\templates\\sounds";

Shouldn't I be able to access this stuff via this, or do I need to add other levels to my actual work directory?

? #2....how do I use pragma paths when my work in a sub directory of say C:\my documents\GSwork\filename? I can only load my projects if ALL scripts in same directory, while I have tried to make seperate folders for maps/sounds/models/scripts. I cant figure out how to write proper paths...ty in advance.

Re: Setting up script paths/pragma path [Re: theraygun] #459118
04/23/16 10:23
04/23/16 10:23
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Hello,
#1 you need to define the paths before including their contents.

#2 you can define a path for a subfolder contained on the folder the main script is contained on by its name.
Code:
#define PRAGMA_PATH "models"
#define PRAGMA_PATH "scripts"



You can go up the folders by "..". I have my module folders on the same folder of project folders and I define my paths by:
Code:
#define PRAGMA_PATH "..\\modules\\math.h"



Note that WED levels need to be on same or higher folder than the main script. Otherway you will not be able to asign it on map properties.

Salud!

Re: Setting up script paths/pragma path [Re: theraygun] #459119
04/23/16 10:34
04/23/16 10:34
Joined: Dec 2011
Posts: 1,823
Netherlands
Reconnoiter Offline
Serious User
Reconnoiter  Offline
Serious User

Joined: Dec 2011
Posts: 1,823
Netherlands
Hi and welcome to the forums,

I personally never used templates cause they are old as f*ck. tongue
What you can try though is instead of writing #include "..." write #include <...>

Use #include "..." if the script file is in your project/game folder.

Also concerninng paths, I use add_folder, e.g. like this:

Code:
function addfolders_startup()
{
	add_folder("models");
	add_folder("data\\sounds");
}



-edit, ninja'd

Last edited by Reconnoiter; 04/23/16 10:34.

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