Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AndrewAMD, Nymphodora, Quad, TipmyPip, Imhotep), 852 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 5 1 2 3 4 5
Re: i've done everything i can think of [Re: Ottawa] #275933
07/02/09 20:08
07/02/09 20:08
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
no, it was just a temporary program until i got my real program finished. So right now lets work with my credits which i just finished. what im wanting to do is when i click on the credits button on my main menu, i want it to switch to my credits program. My credits program and my menu program are two completely different programs.

Last edited by gamingfan101; 07/02/09 20:10.

Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: i've done everything i can think of [Re: gamingfan101] #275940
07/02/09 20:35
07/02/09 20:35
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

But the code for your, "what you call programs", is all together?

If you use #include then the code is a one unit program or a game
and you have one main.

Is this the situation?
Have you done or looked at the workshops?


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: i've done everything i can think of [Re: Ottawa] #275944
07/02/09 20:40
07/02/09 20:40
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
yes i have looked at the workshops but i couldnt find what im looking for. and i mean, i have two completely different programs, "mainmenu.c" and "credits.c".
when i press the credits button in the mainmenu.c i want it to switch to the credits.c program.


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: i've done everything i can think of [Re: gamingfan101] #275946
07/02/09 20:44
07/02/09 20:44
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Then you have to use level_load (thenewlevel).
and if you want to come back
in the other do the same level_load (the previous level)


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: i've done everything i can think of [Re: Ottawa] #275949
07/02/09 20:52
07/02/09 20:52
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
oh, ok thanks!


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: i've done everything i can think of [Re: gamingfan101] #275951
07/02/09 20:57
07/02/09 20:57
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
ok, when i clicked the button to switch it says boxiecredits.c is a bad format. heres the code i used for it.

function creditsswitch()
{
while (key_any) {wait (1); }
level_load("boxiecredits.c");
}

and also when i have the inlcude"boxiecredits.c" both programs play at once and neither of them work.


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: i've done everything i can think of [Re: gamingfan101] #275974
07/02/09 23:08
07/02/09 23:08
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

You have to create a level and the extention of the title is .wmb
as : level_load (boxiecredits.wmb);

Quote:

From the manual.
Gamestudio uses several proprietary file formats that are similar to popular formats used by other engines, such as the engines by id Software. There are five Gamestudio-specific file formats: WMP for a level, WAD for level textures, WMB for a compiled level with BSP tree and lightmaps, MDL for animated models, and HMP for terrain.

.....
WMB files are created by WED's Map Compiler. They contain the content of the WMP file with included textures, BSP tree data, and lightmaps.

....


Use ...Help...search tab.... wmb
you will get 42 pages of information. Good reading smile


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: i've done everything i can think of [Re: Ottawa] #275998
07/03/09 04:09
07/03/09 04:09
Joined: Mar 2009
Posts: 276
Cebu City, Philippines
boyax Offline
Member
boyax  Offline
Member

Joined: Mar 2009
Posts: 276
Cebu City, Philippines
try to look at this some sample code.

Code:
//---------------------------------
// main.c
//---------------------------------
#include <acknex.h>
#include <default.c>

#include "quit.c"  // other c file

//////////////////////////////////////////////////////////////////////
PANEL* main_pan =
{
  bmap = "main.pcx";
  pos_x = 250;     
  pos_y = 200;    
  button (250, 134, "quitclicked.pcx", "quitnormal.pcx", "quitover.pcx", quit_program, NULL, NULL); 
  flags = OVERLAY | VISIBLE;
}

////////////////////////////////////////////////////////////////////
function main()
{
  video_mode = 7; 
  screen_color.blue = 150;
  mouse_mode = 4;
}



Code:
//------------------------------------
// quit.c
//------------------------------------
function quit_program()
{
  while (key_any) { wait (1); }
  sys_exit(NULL);
}



hope that helps.

Re: i've done everything i can think of [Re: boyax] #276213
07/03/09 19:57
07/03/09 19:57
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
ok, thanks but i dont think thats quite what im looking for. I've got the #include part finished. But im having trouble calling it. When i click on the button in one script, i want it to take me to another. I was looking in the manual and i tried this, but i think i misunderstood something. Is there anyway this could work? Or am i going in the wrong direction?

function creditsswitch()
{
while (key_any) { wait (1); }
#include "%EXE_DIR%C:\Users\Charles\Desktop\litec programs\boxiecredits.c";
}

Im sorry if im missunderstanding all of this, please forgive me.


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: i've done everything i can think of [Re: gamingfan101] #276217
07/03/09 20:52
07/03/09 20:52
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
really the wrong direction

#include adds the functions in your script to your main script when compiled, so really you shouldn't be only adding these if you're clicking on a specific button, either add them or don't

any command with # isn't used at runtime, only when compiling, so this really won't work. and, i'm not sure what you are meaning when you say program.


ideally you should have something like:

Code:
//main.c

#define PRAGMA_PATH "Models"
#define PRAGMA_PATH "Sounds"

#include <acknex.h>
#include <default.c>

#include "boxiecredits.c" //no ; required

void main(){
  //whatever needed here
}



Code:
//boxiecredits.c

function show_credits(){
  set(boxie, SHOW);
}



what exactly is the difference in your 2 scripts?

Page 2 of 5 1 2 3 4 5

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