Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, AndrewAMD), 12,726 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
problem with game main menu #348038
11/22/10 05:55
11/22/10 05:55
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline OP
Junior Member
carla_mariz  Offline OP
Junior Member
C

Joined: Sep 2010
Posts: 97
hi,

i've created a game menu and it looked well. but everytim i load the game, the main menu is still visible but the game is running. any ideas please?

here is d code:



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

var speed = 50;

BMAP* mouse_pcx = "mouse.pcx"; // bitmap used for the mouse pointer

function main()
{
//video_screen = 1;
screen_size.x = 800;
screen_size.y = 600;
mouse_map = mouse_pcx;
mouse_mode = 4;
}

function instruction_program()
{
while (key_any) {wait (1);}
level_load("instruct.c");
//sys_exit(main_pan);

}

function load_program()
{
while (key_any) {wait (1);}
level_load("level2maze.wmb");

//sys_exit(main_pan);
}

function exit_program()
{
while (key_any) {wait (1);}

sys_exit(NULL);
}

PANEL* main_pan =
{
layer = 30;
bmap = "pacmantittle2.jpg";
pos_x = -90;
pos_y = 0;
button (390, 250, "player_OVER.pcx", "player_OUT.pcx", "player_OVER.pcx", load_program, NULL, NULL);
button (400, 290, "lan_OVER.pcx", "lan_OUT.pcx", "lan_OVER.pcx", load_program, NULL, NULL);
button (380, 330, "instructions_OVER.pcx", "instructions_OUT.pcx", "instructions_OVER.pcx", instruction_program, NULL, NULL);
button (395, 370, "settings_OVER.pcx", "settings_OUT.pcx", "settings_OVER.pcx", exit_program, NULL, NULL);
button (390, 410, "about_OVER.pcx", "about_OUT.pcx", "about_OVER.pcx", exit_program, NULL, NULL);
button (395, 450, "exit_OVER.pcx", "exit_OUT.pcx", "exit_OVER.pcx", exit_program, NULL, NULL);
flags = OVERLAY | SHOW;
}



thank you!:)

Re: problem with game main menu [Re: carla_mariz] #348040
11/22/10 05:59
11/22/10 05:59
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline OP
Junior Member
carla_mariz  Offline OP
Junior Member
C

Joined: Sep 2010
Posts: 97
bdw, im using 3dgs a7..^_^

Re: problem with game main menu [Re: carla_mariz] #348041
11/22/10 06:31
11/22/10 06:31
Joined: Jul 2009
Posts: 1,198
Berlin, Germany
L
Liamissimo Offline
Serious User
Liamissimo  Offline
Serious User
L

Joined: Jul 2009
Posts: 1,198
Berlin, Germany
You have to turn the panel off with

main_pan.flags &= ~SHOW;


"Ich weiss nicht genau, was Sie vorhaben, aber Sie können keine Triggerzonen durch Ihr Level kullern lassen."
-JCL, 2011
Re: problem with game main menu [Re: Liamissimo] #348049
11/22/10 08:05
11/22/10 08:05
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline OP
Junior Member
carla_mariz  Offline OP
Junior Member
C

Joined: Sep 2010
Posts: 97
should i place it here?


function load_program()
{
while (key_any) {wait (1);}
level_load("level2maze.wmb");
main_pan.flags = SHOW;

//sys_exit(main_pan);
}

laugh

Re: problem with game main menu [Re: carla_mariz] #348050
11/22/10 08:08
11/22/10 08:08
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline OP
Junior Member
carla_mariz  Offline OP
Junior Member
C

Joined: Sep 2010
Posts: 97
still d same..T_T

Re: problem with game main menu [Re: carla_mariz] #348051
11/22/10 08:32
11/22/10 08:32
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
I could only advice to use some 'var' for that (example: var show_menu = 1;).
So if game started, then make var equal to zero (for example in player's script), if in menu then set it back to one.
So if var equals to 1, then make manu panel VISIBLE, other ways make it INVISIBLE.
I hope that will help. Good luck.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: problem with game main menu [Re: carla_mariz] #348052
11/22/10 08:41
11/22/10 08:41
Joined: Feb 2010
Posts: 320
TANA/Madagascar
3dgs_snake Offline
Senior Member
3dgs_snake  Offline
Senior Member

Joined: Feb 2010
Posts: 320
TANA/Madagascar
Hi,
I think It should be :

function load_program()
{
while (key_any) {wait (1);}
level_load("level2maze.wmb");
main_pan.flags &= ~SHOW;

//sys_exit(main_pan);
}

Best regards.

Re: problem with game main menu [Re: 3dgs_snake] #348054
11/22/10 09:23
11/22/10 09:23
Joined: Sep 2010
Posts: 97
C
carla_mariz Offline OP
Junior Member
carla_mariz  Offline OP
Junior Member
C

Joined: Sep 2010
Posts: 97
wow!! it worked!!

thanks 3run, i think i misunderstood your code but it was right..^_^
thanks 3dgs_snake&#9829;


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