Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by Zheka. 06/20/24 14:26
Lapsa's very own thread
by rki. 06/19/24 11:27
A simple game ...
by VoroneTZ. 06/18/24 10:50
Face player all the time ...
by bbn1982. 06/18/24 10:25
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (RealSerious3D, rvl, tomaslolo), 685 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
squik, AemStones, LucasJoshua, Baklazhan, Hanky27
19060 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Start Panel #82429
07/21/06 02:31
07/21/06 02:31
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
I recently made a panel by following a tutorial, in this panel if I click on the "exit" button I exit the game, now what I want is to make a start button that when I click on it I go to the first level mynewgame.wmb.
how would I do that I already created a bmap startgame.pcx but how do I implement that with the mouse if I click on it I go to the first level ?
this is the code.

Quote:


var video_mode = 7; // 800x600 pixels
var video_depth = 32; // 32 bit mode

////////////////////////////////////////////////////////////////////

bmap mouse_pcx = <mouse.pcx>; // bitmap used for the mouse pointer
bmap main_pcx = <main.pcx>; // main panel
bmap quitclicked_pcx = <quitclicked.pcx>;
bmap quitnormal_pcx = <quitnormal.pcx>;
bmap quitover_pcx = <quitover.pcx>;

////////////////////////////////////////////////////////////////////

string work06_wmb = <work06.wmb>;

////////////////////////////////////////////////////////////////////

function main()
{
level_load (work06_wmb);
mouse_map = mouse_pcx;
mouse_mode = 2;
while (1)
{
mouse_pos.x = pointer.x;
mouse_pos.y = pointer.y;
wait (1);
}
}

function quit_program()
{
sleep (3);
exit;
}

//////////////////////////////////////////////////////////////////////

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, refresh, visible;
}




Re: Start Panel [Re: tek] #82430
07/21/06 02:37
07/21/06 02:37
Joined: Aug 2004
Posts: 2,215
I
ISG Offline

Expert
ISG  Offline

Expert
I

Joined: Aug 2004
Posts: 2,215
var video_mode = 7; // 800x600 pixels
var video_depth = 32; // 32 bit mode

////////////////////////////////////////////////////////////////////

bmap mouse_pcx = <mouse.pcx>; // bitmap used for the mouse pointer
bmap main_pcx = <main.pcx>; // main panel
bmap quitclicked_pcx = <quitclicked.pcx>;
bmap quitnormal_pcx = <quitnormal.pcx>;
bmap quitover_pcx = <quitover.pcx>;
bmap startgame_pcx = <startgame.pcx>;
////////////////////////////////////////////////////////////////////

string work06_wmb = <work06.wmb>;
string mynewgame = <mynewgame.WMB>;

////////////////////////////////////////////////////////////////////

function main()
{
level_load (work06_wmb);
mouse_map = mouse_pcx;
mouse_mode = 2;
while (1)
{
mouse_pos.x = pointer.x;
mouse_pos.y = pointer.y;
wait (1);
}
}

function quit_program()
{
sleep (3);
exit;
}

function startgame_function()
{
wait(1);
level_load(mynewgame);
}

//////////////////////////////////////////////////////////////////////

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, refresh, visible;
}

panel start_game
{
bmap = startgame_pcx;
pos_x = 100;
pos_y = 100;
flags = overlay, visible;
on_click = startgame_function();
}


Ground Tactics - Coming Soon
Ground Tactics OFFICIAL WEBSITE
Re: Start Panel [Re: ISG] #82431
07/21/06 03:12
07/21/06 03:12
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
cool it works, im sorry just one more question when I do load the level the mouse pointer is still on and the main pcx do you know how I could turn that off when I start mynewgame ?

Re: Start Panel [Re: tek] #82432
07/21/06 03:59
07/21/06 03:59
Joined: Aug 2004
Posts: 2,215
I
ISG Offline

Expert
ISG  Offline

Expert
I

Joined: Aug 2004
Posts: 2,215
Change this function to this:

function startgame_function()
{
wait(1);
level_load(mynewgame);
start_game.visible = off;
//mouse_pcx.visible = off; //MAYBE this is what it is?
}


Ground Tactics - Coming Soon
Ground Tactics OFFICIAL WEBSITE
Re: Start Panel [Re: ISG] #82433
07/21/06 04:34
07/21/06 04:34
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
nah doesnt work it gives me errors

Parameter unknown start_game keyword

Parameter unknown mouse_pcx keyword

I tried messing with it a little but didnt work

Re: Start Panel [Re: tek] #82434
07/21/06 04:36
07/21/06 04:36
Joined: Aug 2004
Posts: 2,215
I
ISG Offline

Expert
ISG  Offline

Expert
I

Joined: Aug 2004
Posts: 2,215
Place the Panels syntax above the functions...


Ground Tactics - Coming Soon
Ground Tactics OFFICIAL WEBSITE
Re: Start Panel [Re: ISG] #82435
07/21/06 04:56
07/21/06 04:56
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
I did that and it started to work problem is that the mouse.pcx still didnt work

function startgame_function()
{
wait(1);
load_level(<mynewgame.wmb>);
start_game.visible = off;
main_pan.visible=off;
mouse_pcx.visible = off;
}

I added the main_pan.visible=off;

I would like to take away the mouse pointers cause moving the mouse I use for my main player for instance it makes him move left and right.
can it be done if not it's ok

Re: Start Panel [Re: tek] #82436
07/21/06 05:10
07/21/06 05:10
Joined: Aug 2004
Posts: 2,215
I
ISG Offline

Expert
ISG  Offline

Expert
I

Joined: Aug 2004
Posts: 2,215
Make the pointer mouse.pcx defined in a panel then make it appear as a panel, and you can take it away the same way I made main_pan.visible = off; disappear. Try a few things out


Ground Tactics - Coming Soon
Ground Tactics OFFICIAL WEBSITE
Re: Start Panel [Re: ISG] #82437
07/21/06 05:33
07/21/06 05:33
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
ok thanks ill try it

Re: Start Panel [Re: tek] #82438
07/21/06 23:13
07/21/06 23:13
Joined: May 2005
Posts: 222
T
tek Offline OP
Member
tek  Offline OP
Member
T

Joined: May 2005
Posts: 222
:\ I havemt been able to do it, i just cant get rid of the mouse pointers, does anyone know how I can make that dissapear ???

Page 1 of 2 1 2

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