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 1 of 5 1 2 3 4 5
ok, maybe i am going about this all wrong.... #137399
06/21/07 00:28
06/21/07 00:28
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. i posted a menu issue here. testDummy has been extremely helpful, but I am still having problems. So i have to ask, is there another way?

now, my goals for the menu...

1. load my level with all scripts intact.
2. play a movie/intro before the level.

my question is, can't i just have a basic menu that loads the level, and have a seperate script that plays the movie that is connected to the level itself, and not the menu? Basically play the movie from the level, and not from the menu. the code i am using just seems to be more of a problem than i wanted. any advice?

Re: ok, maybe i am going about this all wrong.... [Re: Blink] #137400
06/21/07 06:18
06/21/07 06:18
Joined: Oct 2004
Posts: 1,655
T
testDummy Offline
Serious User
testDummy  Offline
Serious User
T

Joined: Oct 2004
Posts: 1,655
Ok double-poster (joking) read this or at least link to it
Um yeah, as far as I know scripts aren't connected to levels (wmbs). If anything, I think it's the other way around (wmbs tied to action names in scripts). However, I may have it very wrong.
No doubt, the hordes rushing to solve this issue, will prove I am bumbling fool, with their simple one sentence, found in under 3 secs, solutions. Seriously.

Re: ok, maybe i am going about this all wrong.... [Re: testDummy] #137401
06/21/07 07:47
06/21/07 07:47
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Quote:

No doubt, the hordes rushing to solve this issue, will prove I am bumbling fool, with their simple one sentence, found in under 3 secs, solutions.


no, you're actually right

to explain testDummy's response a little further (as well as adding some more info based on my experiences/guesses), the script you attach to a level in WED just assists in testing that level as it knows which script to use when you press "RUN". but when you actually put together a game, the scripts you choose to link to the levels in WED don't have any effect on your finished product (from what i have gathered).

i hope you didn't write separate scripts for each level, because that could be tedious to fix -- they can have seperate scripts, but they need to link to each other, and each script cannot do something another does (you don't want to have two of the same action coz even if they are identical, the compiler will probably complain about a double-definition).

someone who has actually published a multi-level project might come along and help you out more, as well as possibly proving testDummy and i are both bumbling fools but i'm sure this is all true from what i've gathered ^^

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: ok, maybe i am going about this all wrong.... [Re: JibbSmart] #137402
06/22/07 17:02
06/22/07 17:02
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline OP

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
well, in this case, i am the bumbling fool. something that seemed easy has become my greatest problem. a menu!!!! i just want to start my game,lol!

Re: ok, maybe i am going about this all wrong.... [Re: Blink] #137403
06/22/07 18:11
06/22/07 18:11
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
If its just an intro movie then playing from 'main' will do the job, if its a movie within an object (bmap or something), then a seperate action is needed.

One script to rule them all (main) is the only way it goes so any subsequent calls need to be within that one script, regardless of how many levels you have.

Re: ok, maybe i am going about this all wrong.... [Re: Nems] #137404
06/22/07 18:24
06/22/07 18:24
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 you are saying, if i add the movie script to the main of my target level it will play before the level starts?


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] #137405
06/22/07 19:48
06/22/07 19:48
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
No.
Lets say you have 2 levels and one wmb for the menu, named for example:
menu.wmb
level01.wmb
level02.wmb

Now each level has a script file (which is not needed by the way).
However when you run the game your probably run the main function of the menu.wmb script file.
Which loads the menu, just as you want.
But if you now load level01.wmb from your level the main function of the level01.wmb's script file will NOT be executed.
Thus you should set up your project in a different manner.
Use one script file which loads all the needed things and so on and includes a main function.
Now use this script (while developing) to load the different levels for testing purpose.
Before finishing you can just include the menu and let the menu code do the game-level loading.

By the way: For a panel based menu you do not need to load any level (.wmb)

Re: ok, maybe i am going about this all wrong.... [Re: Xarthor] #137406
06/22/07 20:25
06/22/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
ok Xarthor, I am confused again. are you saying, instead of trying to run my levels from a menu script, do it in reverse, include the menu script in the dummy level wdl? include the menu script and all of the includes that i need from the main of the dummy level, since i already have a code for the menu only, just make a code that loads the level from the menu? like this?

Code:
var video_mode=7;
var video_screen=2;
var movie_handle = 0;
/******************************
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, play_a_movie, 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 play_a_movie()
{
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);
}



this code loads the menu, and plays the movie with no problems. but when its time to load the level, i get windows saying "malfunction w1501: Cant find plBiped 01.wdl", etc. do i now add those missing scripts to the dummy level? do i also have to add a player to the dummy level, and give him the plBiped01 actions, even though the level is empty?

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

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
my question is, how does anyone get their menu working without all of these problems,lol? is it because I am using templates to build?

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

Expert
Blink  Offline OP

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Update: I tried it that way, this is what happened.

1. the menu popped up, but it was transparent, and i couldnt use the cursor to start game.
2. the level loaded behind the transparent menu panel, and no errors at all, because i included all of the scripts i needed in the dummy level, along with a player model i added to the dummy level with the plBiped01 action.
3. it ran perfectly, but the menu was still transparent.

so let me ask. can i make the menu visible, click start and run the movie, and the remove the menu after the movie plays and play the loaded level from there? it sounds like it could work, but i am not sure if its possible.


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."
Page 1 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