Hello Folks,
After days and days of headaches, i was able to create different pause menus for different levels.
My idea, for my 007 fan game, is that in each stage the player will access a "mission dossier" that contains 2 pages, one page is with the mission objectives explained, and the 2nd page is for a fake inventory, that will list the famous "007 Gadgets" that are avaiable for use in the current misson, with a little explanation on how to use them.
In fact this pause menu is not interactive, i don`t need it, this is just a way to have ingame instructions for the player, and each level will have a different "dossier", containing different informations.
I could do it easily with a trigger zone and just with a "scancodekeypressed" command. However, the player will not be able to read those briefings calmly, because there is no way to pause the game except using the setuplevel.fpi script. And i have done like the game Goldeneye 007 Pause menu, when the player pauses the game, he has access to a lot of options, like reading mission briefing, mission objectives, load game, save game, and such.
And i have done this same way.
This script works perfectly, but the only problem is that i stuck in the 350 lines per script limit.
I plan to have from 18 to 20 levels for my game, and with this limit of 350 lines per script, i would not be able to have a pause menu for more than 8 to 9 levels (because i repeated the pause game script to each level).
I spent more than one week until find a way for it to work, i tried a lot of things, tried the command "runfpi" as a way to have different setuplevel.fpi for each level, but none of those trials worked.
The only way that i could make it to work is as follows in the bottom of this post.
If someone has an idea of how could i overcome this 350 lines limit per script to have all the pause menus for all my 20 levels inside the setuplevel.fpi, i would be very gratefull.
Or even another idea, other workarround is also welcome.
Obs: The pause game command DOES NOT WORK WHEN CALLED OUTSIDE the setuplevel.fpi. I even asked Scene Commander, and he confirmed this.
Cheers,
007.
desc = Setup Wizard V117
;Setup Level Stats
:state=0:sky=skybank\ww2\Gas
:state=0:music=audiobank\music\generic\main.wav,musicvolume=50,soundscale=25
:state=0:fog=0,fogred=0,foggreen=0,fogblue=0
:state=0:ambience=100,ambiencered=255,ambiencegreen=255,ambienceblue=255
;here we declare the variable that will check in which mission number the player is, so the script will be able to load the correct HUD`s
:state=0:dimvar=mission
;Load Internal HUDS
:state=0:hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore\huds\fader.tga,hudhide=1,hudtype=3,hudmake=internal
:state=0:hudreset,hudx=50,hudy=50,hudred=128,hudgreen=0,hudblue=0,hudsizex=1024,hudsizey=768,hudimage=gamecore\huds\eyehud.tga,hudhide=1,hudtype=2,hudmake=internal
:state=0:hudreset,hudx=50,hudy=50,hudred=128,hudgreen=128,hudblue=128,hudsizex=1024,hudsizey=768,hudimage=gamecore\huds\zoom.tga,hudhide=1,hudtype=4,hudmake=internal
:state=0:hudreset,hudx=5,hudy=5,hudimage=languagebank\english\gamecore\huds\lives.tga,hudtype=1,hudmake=display
:state=0:hudreset,hudx=4,hudy=8,hudsizex=16,hudsizey=16,hudimage=gamecore\huds\numeric1.tga,hudtype=1,hudmake=numeric
:state=0:hudreset,hudx=15,hudy=5,hudimage=languagebank\english\gamecore\huds\health.tga,hudtype=2,hudmake=display
:state=0:hudreset,hudx=14,hudy=8,hudsizex=16,hudsizey=16,hudimage=gamecore\huds\numeric1.tga,hudtype=2,hudmake=numeric
:state=0:hudreset,hudx=85,hudy=8,hudimage=gamecore\huds\ammo.tga,hudtype=3,hudmake=status
:state=0:hudreset,hudx=88,hudy=12,hudsizex=16,hudsizey=16,hudimage=gamecore\huds\numeric1.tga,hudtype=3,hudmake=numeric
;Load Pause Menu HUDS and btns
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\backdrops\My Game\dossier_base.dds,hudname=dossier_base,hudhide=1,hudmake=display
;mission 1 pause huds
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\backdrops\My Game\mission_1_pg1.dds,hudname=mission_1_pg1,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\backdrops\My Game\mission_1_pg2.dds,hudname=mission_1_pg2,hudhide=1,hudmake=display
;mission 2 pause huds
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\backdrops\My Game\mission_2_pg1.dds,hudname=mission_2_pg1,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\backdrops\My Game\mission_2_pg2.dds,hudname=mission_2_pg2,hudhide=1,hudmake=display
;game buttons and mouse cursor
:state=0:hudreset,hudx=24,hudy=66,hudimage=gamecore\backdrops\My Game\btn_resume.dds,hudtype=4,hudname=returngame,hudhide=1,hudmake=button
:state=0:hudreset,hudx=24,hudy=75,hudimage=gamecore\backdrops\My Game\btn_abort.dds,hudtype=5,hudname=quitgame,hudhide=1,hudmake=button
:state=0:hudreset,hudx=24,hudy=84,hudimage=gamecore\backdrops\My Game\btn_load.dds,hudtype=2,hudname=loadgame,hudhide=1,hudmake=button
:state=0:hudreset,hudx=89,hudy=22,hudimage=gamecore\backdrops\My Game\btn_objectives_selected.dds,hudtype=6,hudname=btn_objectives_selected,hudhide=1,hudmake=button
:state=0:hudreset,hudx=89,hudy=22,hudimage=gamecore\backdrops\My Game\btn_objectives_noselected.dds,hudtype=6,hudname=btn_objectives_noselected,hudhide=1,hudmake=button
:state=0:hudreset,hudx=89,hudy=55,hudimage=gamecore\backdrops\My Game\btn_inventory_selected.dds,hudtype=11,hudname=btn_inventory_selected,hudhide=1,hudmake=button
:state=0:hudreset,hudx=89,hudy=55,hudimage=gamecore\backdrops\My Game\btn_inventory_noselected.dds,hudtype=11,hudname=btn_inventory_noselected,hudhide=1,hudmake=button
:state=0:hudreset,hudx=50,hudy=50,hudimage=gamecore\backdrops\My Game\pointer.dds,hudname=pointer,hudhide=1,hudmake=pointer
:state=0:state=1
;here we will be using a test statement to set the mission number variable
:state=1:setvar=mission 2
;when player presses [ESC] key will pause game and go to state 2 and show dossier base HUD
:state=1,escapekeypressed=1:pausegame,state=2,sound=audiobank\My Game\menus\page_flip.wav,hudshow=dossier_base
;here will detect in which level the level is
:state=2,escapekeypressed=0,varequal=mission 1:state=7
:state=2,escapekeypressed=0,varequal=mission 2:state=14
;/////////////Pause Menu for Mission 1///////////////////////////////////////////////////////////////////////////////////////////////////
;here will show the btns
:state=3:sound=audiobank\My Game\menus\page_flip.wav,hudshow=returngame,hudshow=quitgame,hudshow=loadgame,hudshow=btn_objectives_selected,hudshow=btn_inventory_noselected,hudshow=pointer,state=4
;btn click action for resume mission
:state=4,hudselectionmade=4:sound=audiobank\My Game\menus\page_flip.wav,state=6
;btn click action for abort mission
:state=4,hudselectionmade=5:sound=audiobank\My Game\menus\page_flip.wav,continuegame,destroy
;btn click action for loadgame
:state=4,hudselectionmade=2:sound=audiobank\My Game\menus\page_flip.wav,loadgame
;btn click action for objectives page
:state=4,hudselectionmade=6,varequal=mission 1:sound=audiobank\My Game\menus\page_flip.wav,state=8
;btn click action for inventory page
:state=4,hudselectionmade=11,varequal=mission 1:sound=audiobank\My Game\menus\page_flip.wav,state=9
;if player presses [ESC] key again will also resume game
:state=4,escapekeypressed=1:state=5
:state=5,escapekeypressed=0:state=6
;state 6 is for resume game
:state=6:hudunshow=dossier_base,hudunshow=mission_1_pg1,hudunshow=mission_1_pg2,hudunshow=mission_2_pg1,hudunshow=mission_2_pg2,hudunshow=mission_3_pg1,hudunshow=mission_3_pg2,hudunshow=mission_4_pg1,hudunshow=mission_4_pg2,hudunshow=mission_5_pg1,hudunshow=mission_5_pg2,hudunshow=mission_6_pg1,hudunshow=mission_6_pg2,hudunshow=mission_7_pg1,hudunshow=mission_7_pg2,hudunshow=mission_8_pg1,hudunshow=mission_8_pg2,hudunshow=mission_9_pg1,hudunshow=mission_9_pg2,hudunshow=mission_10_pg1,hudunshow=mission_10_pg2,hudunshow=returngame,hudunshow=quitgame,hudunshow=loadgame,hudunshow=btn_inventory_selected,hudunshow=btn_inventory_noselected,hudunshow=btn_objectives_selected,hudunshow=btn_objectives_noselected,hudunshow=pointer,resumegame,sound=audiobank\My Game\menus\page_flip.wav,state=1
;states for show and unshow pages
:state=7:hudshow=mission_1_pg1,state=3
;flip inventory page to objectives page
:state=8:hudunshow=mission_1_pg2,hudshow=mission_1_pg1,hudunshow=btn_inventory_selected,hudshow=btn_inventory_noselected,hudunshow=btn_objectives_noselected,hudshow=btn_objectives_selected,state=4
;flip objectives page to inventory page
:state=9:hudunshow=mission_1_pg1,hudshow=mission_1_pg2,hudunshow=btn_inventory_noselected,hudshow=btn_inventory_selected,hudunshow=btn_objectives_selected,hudshow=btn_objectives_noselected,state=4
;/////////////Pause Menu for Mission 1///////////////////////////////////////////////////////////////////////////////////////////////////
;/////////////Pause Menu for Mission 2///////////////////////////////////////////////////////////////////////////////////////////////////
;here will show the btns
:state=10:sound=audiobank\My Game\menus\page_flip.wav,hudshow=returngame,hudshow=quitgame,hudshow=loadgame,hudshow=btn_objectives_selected,hudshow=btn_inventory_noselected,hudshow=pointer,state=11
;btn click action for resume mission
:state=11,hudselectionmade=4:sound=audiobank\My Game\menus\page_flip.wav,state=13
;btn click action for abort mission
:state=11,hudselectionmade=5:sound=audiobank\My Game\menus\page_flip.wav,continuegame,destroy
;btn click action for loadgame
:state=11,hudselectionmade=2:sound=audiobank\My Game\menus\page_flip.wav,loadgame
;btn click action for objectives page
:state=11,hudselectionmade=6,varequal=mission 2:sound=audiobank\My Game\menus\page_flip.wav,state=15
;btn click action for inventory page
:state=11,hudselectionmade=11,varequal=mission 2:sound=audiobank\My Game\menus\page_flip.wav,state=16
;if player presses [ESC] key again will also resume game
:state=11,escapekeypressed=1:state=12
:state=12,escapekeypressed=0:state=13
;state 6 is for resume game
:state=13:hudunshow=dossier_base,hudunshow=mission_1_pg1,hudunshow=mission_1_pg2,hudunshow=mission_2_pg1,hudunshow=mission_2_pg2,hudunshow=mission_3_pg1,hudunshow=mission_3_pg2,hudunshow=mission_4_pg1,hudunshow=mission_4_pg2,hudunshow=mission_5_pg1,hudunshow=mission_5_pg2,hudunshow=mission_6_pg1,hudunshow=mission_6_pg2,hudunshow=mission_7_pg1,hudunshow=mission_7_pg2,hudunshow=mission_8_pg1,hudunshow=mission_8_pg2,hudunshow=mission_9_pg1,hudunshow=mission_9_pg2,hudunshow=mission_10_pg1,hudunshow=mission_10_pg2,hudunshow=returngame,hudunshow=quitgame,hudunshow=loadgame,hudunshow=btn_inventory_selected,hudunshow=btn_inventory_noselected,hudunshow=btn_objectives_selected,hudunshow=btn_objectives_noselected,hudunshow=pointer,resumegame,sound=audiobank\My Game\menus\page_flip.wav,state=1
;states for show and unshow pages
:state=14:hudshow=mission_2_pg1,state=10
;inventory to objectives
:state=15:hudunshow=mission_2_pg2,hudshow=mission_2_pg1,hudunshow=btn_inventory_selected,hudshow=btn_inventory_noselected,hudunshow=btn_objectives_noselected,hudshow=btn_objectives_selected,state=11
;objectives to inventory
:state=16:hudunshow=mission_2_pg1,hudshow=mission_2_pg2,hudunshow=btn_inventory_noselected,hudshow=btn_inventory_selected,hudunshow=btn_objectives_selected,hudshow=btn_objectives_noselected,state=11
;/////////////Pause Menu for Mission 2///////////////////////////////////////////////////////////////////////////////////////////////////
Goldenye 007 N64