Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Newbie Questions
by AndrewAMD. 12/04/23 11:14
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
2 registered members (TipmyPip, izorro), 556 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 5 1 2 3 4 5
Re: ok, maybe i am going about this all wrong.... [Re: Blink] #137409
06/22/07 20:52
06/22/07 20:52
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
No I did not say that you should attach your menu wdl file to your game levels.
Alright step by step:
Open WED and save the new level as "game.wmp" build it and attach a new script file with all the templates included you need.
Open the game.wdl and include your menu script there too.
Edit the main wdl file to load your menu.

Now you just need a function which loads a particular level from the menu.
Example:
You have a button which performs the following function when it was clicked:
Code:

function load_first_level()
{
hide_menu();
level_load("my_first_level.wmb");
wait(3);
}



EDIT:
You get that error "malfunction [bla] cannot find plbiped01" (or whatever) because you have NOT included the templates into that script file.
Include all needed template files at the top of the script file which contains your main function (you just posted) and you should be fine.

Last edited by Xarthor; 06/22/07 20:55.
Re: ok, maybe i am going about this all wrong.... [Re: Xarthor] #137410
06/22/07 21:05
06/22/07 21:05
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
ok, so i created the dummy level like you said. now, should i re-write the menu script and call it from the main of my dummy level? oh my, my brain is hurting,lol. i still dont get it,lol. can you explain again, i am kinda slow sometimes.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: ok, maybe i am going about this all wrong.... [Re: Blink] #137411
06/22/07 21:06
06/22/07 21:06
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
i didnt add it to an actual game level, i added it to a dummy level that loaded a game level. i guess that was a mistake.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: ok, maybe i am going about this all wrong.... [Re: Blink] #137412
06/22/07 21:43
06/22/07 21:43
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Alright let me give you a simple step by step tutorial:
Basic Project Set-Up

1. Folder set-up
At first we start to create a project folder which will contain all project related data
later on.
I choosed the name [Blinky]
(Note: I will write all folder names into [ ] signs])

Now lets go down a level and create some sub folders in our brand new project folder:
[scripts] //which will contain almost all script files later on
[levels] //this one will contain all level (wmp/wmb) files

2. Setting up the game's main script
Now its time to set-up the one and only main script of the project.
So lets open SED and a fresh new script and save it into our project folder.
NOT into any subfolder of the project.
I choosed the name: "game.wdl"
Well the time has come to actually start writing some code into the "game.wdl":
Code:

// project: Blinky
// file: game.wdl


// ===========================================================================
// PATHES

path "scripts";
path "levels";


// ===========================================================================
// INCLUDES
/* we will add some includes here later on */


// ===========================================================================
// SETTINGS

var video_mode = 7;
var video_screen = 2;
var video_depth = 32;


// ===========================================================================
// MAIN FUNCTION

function main()
{
wait(3);
}

// ===========================================================================
// END OF: game.wdl



Save the script and run it from SED, as you can see it does nothing but create a
window into the "void"

3. Adding the menu
Now its time to add the menu, to do so we open a new script file and save it
into the project's subfolder [scripts].
I saved it as: "menu.wdl"
And here comes it's content:
Code:

// project: blinky
// file: menu.wdl

/******************************
bmaps
******************************/
bmap exit_g_w=<exit_game_white.tga>;
bmap exit_g = <exit_game.tga>;
bmap gilogo=<gicdcvr2.bmp>;
bmap main_tga = <gicdcvr2.bmp>; // another duplicate
bmap movie1_tga = <new_game.tga>;
bmap movie2_tga = <new_game_white.tga>;
bmap pfeil = <pfeil.tga>;
/******************************
strings
******************************/
string level_wmb = <nurfcut.wmb>;
/******************************
function prototypes
******************************/
function exit_game();
function menue();
function play_a_movie();
panel pn_menue {
bmap = gilogo;
button=255,400,movie2_tga, movie1_tga, movie2_tga, start_game, null, null;
button=255,475,exit_g_w,exit_g,exit_g_w,exit_game,null,null;
flags= transparent,visible;
layer=10;
}
/******************************
exit_game
******************************/
function exit_game() {
// exit;
sys_exit("Make love, then make war.");
}
/******************************/
function menue() {
//while(levelstart==0){wait(1);}
mouse_mode=2;
mouse_map=pfeil;
pn_menue.visible=on;
pn_menue.alpha=85;
while(pn_menue.visible==on){
mouse_pos.x=pointer.x;
mouse_pos.y=pointer.y;
wait(1);}
}
}
///////////////////////////////////////////////

string gimov_new_avi = <gimov_new.avi>;
var aviHandle;
//////////////////////////////////////////////////////////
// AVI Code - now add these lines before your level_load
// call in your main function

string level_str = <nurfcut.WMB>;///Name of your level

function start_game()
{
mouse_mode = 0;
pn_menue.visible = off; //switch off the menu

aviHandle = media_play(gimov_new_avi,null,100);
while(media_playing(aviHandle))
{
if(key_space)
{
media_stop(aviHandle);
}
wait(1);
}
wait(1);
// now load the level
level_load(level_str);
wait(3);
}


Now save that "menu.wdl" and go back to the "game.wdl":
Lets add some stuff there too.
First we include the "menu.wdl" in our include section:
Code:

// ===========================================================================
// INCLUDES:

include <menu.wdl>



Now we have to call the function "menue();" from the main function:
Code:

function main()
{
wait(3);

//start the menu:
menue();
}



So our complete "game.wdl" file now looks like this:
Code:

// project: Blinky
// file: game.wdl


// ===========================================================================
// PATHES

path "scripts";
path "levels";


// ===========================================================================
// INCLUDES

include <menu.wdl>;


// ===========================================================================
// SETTINGS

var video_mode = 7;
var video_screen = 2;
var video_depth = 32;


// ===========================================================================
// MAIN FUNCTION

function main()
{
wait(3);

//start the menu:
menue();
}

// ===========================================================================
// END OF: game.wdl



Now the only thing you have to make sure is to copy your level file "nurfcut.wmb"
to the subdirectory [levels]

The last remaining step:
Add all necessary script files to the include section of the "game.wdl"

Hope this helps.

Re: ok, maybe i am going about this all wrong.... [Re: Xarthor] #137413
06/23/07 12:59
06/23/07 12:59
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
thanks Xarthor, but I did exactly what you said, and i have the same problem, transparent menu, with the loaded level behind it, and my cursor doesnt work, so i cant play the movie. i solved the transparent menu by just making it visible instead of invisible, but how do i get the cursor back, and will it play my movie? i thought it was only supposed to load the menu from the dummy level, then wait until i press start to play the movie and load the level?


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: ok, maybe i am going about this all wrong.... [Re: Blink] #137414
06/23/07 13:30
06/23/07 13:30
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Did you also make the changes to the menu.wdl file?
As you may have noticed I had to change the function start_game a little (beside renaming it)

Re: ok, maybe i am going about this all wrong.... [Re: Xarthor] #137415
06/23/07 20:25
06/23/07 20:25
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
no, i didnt do that, i will look at it again, thanks.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: ok, maybe i am going about this all wrong.... [Re: Blink] #137416
06/23/07 22:32
06/23/07 22:32
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
ok Xarthor, i did everything you said, and the menu is perfect, but i ran into the same issue with the includes. the menu runs perfectly without the includes, but when i add them, the menu wont run at all, and i get a bunch of errors. am i forgetting something? this is the code without the includes.

Code:
// project: Blinky
// file: game.wdl
// ===========================================================================
//paths
path "C:\\Program Files\\GStudio6\\template_6"; // Path to A6 templates directory
path "C:\\Program Files\\GStudio6\\template_6\\code"; // Path to A6 template code subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\images"; // Path to A6 template image subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\sounds"; // Path to A6 template sound subdirectory
path "C:\\Program Files\\GStudio6\\template_6\\models"; // Path to A6 template model subdirectory
/////////////////////////////////////////////////////////////////
// Included files
include <numen622.wdl>;

// ===========================================================================
// SETTINGS
var video_mode = 7;
var video_screen = 2;
var video_depth = 32;
// ===========================================================================
// MAIN FUNCTION
function main()
{
wait(3);

//start the menu:
menue();
}
// ===========================================================================
// END OF: game.wdl



Re: ok, maybe i am going about this all wrong.... [Re: Blink] #137417
06/23/07 22:36
06/23/07 22:36
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
here are the includes i tried to add. i made sure they were all in the right directory too. i renamed my "menu" script, numen622.wdl, so i wouldnt have any conflicts with the other script.

include <gid01.wdl>; // global ids
include <display00.wdl>; // basic display settings
include <plSelect.wdl>;
include <cameraTarget.wdl>;
include <miscInput01.wdl>;
include <plBipedInput01.wdl>;
include <bipedPhy01.wdl>;
include <bipedAnim01.wdl>;
include <bipedSnd01.wdl>;
include <plBiped01.wdl>;
include <cameraSelect.wdl>;
include <trigger00.wdl>;
include <particle00.wdl>;
include <fxa01.wdl>;
include <fxGore01.wdl>;
include <weaponfx00.wdl>;
include <weapons00.wdl>;
include <aiFPS01.wdl>;
include <plBipedWeap00.wdl>;
include <plBipedWeapHUD01.wdl>;
include <plBipedHUD01.wdl>;
include <lift01.wdl>;
include <saveLoad00.wdl>;
include <saveLoad01.wdl>;
include <menu01.wdl>;
include <camera3rd01.wdl>;
include <cutscene00.wdl>;
include <door01.wdl>;
include <invent01.wdl>;

include <multibreak.wdl>;
include <ii_levelsPlus.wdl>;
include <alarmlite.wdl>;
include <synclite.wdl>;
include <nuflash.wdl>;

Re: ok, maybe i am going about this all wrong.... [Re: Blink] #137418
06/24/07 05:11
06/24/07 05:11
Joined: May 2005
Posts: 819
U.S.
Why_Do_I_Die Offline
Warned
Why_Do_I_Die  Offline
Warned

Joined: May 2005
Posts: 819
U.S.
I'm not sure about whats wrong , i didnt read the whole thing , but i would sujjest commenting out all the includes, then uncomment one , save , and run the game , and keep doing that for all of them till you run into the one causing you the problem. Also , take a look at the errors , usually they will point you into the direction of whats wrong , it could be many things causing the errors.

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