2 registered members (AndrewAMD, TipmyPip),
12,709
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Help plz
[Re: Lukas]
#186997
03/04/08 22:08
03/04/08 22:08
|
Joined: Feb 2008
Posts: 27 kentucky
SpearBang
OP
Newbie
|
OP
Newbie
Joined: Feb 2008
Posts: 27
kentucky
|
Quote:
2) Hide a panel: your_panel.flags &= ~VISIBLE; Remove a panel: pan_remove(your_panel);
i have tryed this but noluck where would i use this can it be used like this? Code:
if (startpan_hide=1) { start_pan.flags &= ~VISIBLE; }
|
|
|
Re: Help plz
[Re: JibbSmart]
#186999
03/05/08 00:27
03/05/08 00:27
|
Joined: Feb 2008
Posts: 27 kentucky
SpearBang
OP
Newbie
|
OP
Newbie
Joined: Feb 2008
Posts: 27
kentucky
|
ok what i am trying to do is when it a button with mouse it takes me to new game and starts the game and removes the panel here is my code Code:
var startpan_hide = 0;
function main() { video_mode = 7; mouse_map = mouse_bmp; mouse_mode = 2; level_load("mainmenu.WMB"); wait (1); ///////////////////////////////////camera set for mainmenu vec_set(camera.x,vector(-123,-123,-103)); // place the camera at X,Y,Z camera.pan = 77; camera.tilt = 15; camera.roll = 0; while (1) { mouse_pos.x = mouse_cursor.x; mouse_pos.y = mouse_cursor.y; wait (1); } }
function load_start() { camera.x = 200; level_load("level_start.WMB"); startpan_hide = 1; wait(1); }
PANEL* start_pan = { layer = 10; pos_x = 20; pos_y = 60; button (22,22,"DS_ss_button_1.bmp","DS_ss_button_2.bmp","DS_ss_button_1.bmp",load_start,NULL,NULL); digits (50,25,4,start_font,10,start_button); button (22,62,"DS_ss_button_1.bmp","DS_ss_button_2.bmp","DS_ss_button_1.bmp",load_start,NULL,NULL); digits (50,65,4,start_font,10,load_button); digits (10,30,4,start_font,10,startpan_hide); flags = VISIBLE; } if (startpan_hide == 1) { pan_remove(start_pan); } but when it loads it the buttons are still seen
|
|
|
Re: Help plz
[Re: PadMalcom]
#187002
03/05/08 09:48
03/05/08 09:48
|
Joined: Aug 2007
Posts: 1,922 Schweiz
Widi
Serious User
|
Serious User
Joined: Aug 2007
Posts: 1,922
Schweiz
|
... something wrong at your code. You have to move if (startpan_hide == 1) { pan_remove(start_pan); } into the while(1) loop in the main function.
Last edited by Widi; 03/05/08 09:50.
|
|
|
Re: Help plz
[Re: Widi]
#187003
03/05/08 14:20
03/05/08 14:20
|
Joined: Aug 2007
Posts: 44 QLD, Australia
Serex
Newbie
|
Newbie
Joined: Aug 2007
Posts: 44
QLD, Australia
|
set() and reset() are your friends Code:
PANEL* start_pan = { layer = 10; pos_x = 20; pos_y = 60; button (22,22,"DS_ss_button_1.bmp","DS_ss_button_2.bmp","DS_ss_button_1.bmp",load_start,NULL,NULL); digits (50,25,4,start_font,10,start_button); button (22,62,"DS_ss_button_1.bmp","DS_ss_button_2.bmp","DS_ss_button_1.bmp",load_start,NULL,NULL); digits (50,65,4,start_font,10,load_button); digits (10,30,4,start_font,10,startpan_hide); flags = VISIBLE; }
function main() { video_mode = 7; mouse_map = mouse_bmp; mouse_mode = 2; level_load("mainmenu.WMB"); wait (1); /////////////////////////////////// camera set for mainmenu vec_set(camera.x,vector(-123,-123,-103)); // place the camera at X,Y,Z camera.pan = 77; camera.tilt = 15; camera.roll = 0; set(start_pan, VISIBLE); while (1) { mouse_pos.x = mouse_cursor.x; mouse_pos.y = mouse_cursor.y; wait (1); } }
function load_start() { camera.x = 200; level_load("level_start.WMB"); reset(start_pan, VISIBLE); wait(1); }
|
|
|
|