|
2 registered members (TipmyPip, izorro),
556
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
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
OP

Expert
|
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
testDummy
Serious User
|
Serious User
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
JibbSmart
Expert
|
Expert
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: Nems]
#137404
06/22/07 18:24
06/22/07 18:24
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP

Expert
|
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: Xarthor]
#137406
06/22/07 20:25
06/22/07 20:25
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP

Expert
|
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]
#137408
06/22/07 20:48
06/22/07 20:48
|
Joined: Jan 2006
Posts: 2,157 Connecticut, USA
Blink
OP

Expert
|
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."
|
|
|
|