Posted: 5th Nov 2012 11:59
;AIScript from Wizard
;Header
desc = Title Page Wizard V103
;Script
;buttons in FPSC only work if assigned to a type, and according to the FPSC Syntax Script List by Ched80 we have the following types number for button HUD`s: 1,2,3,4,5,6,11
;but i tried type=7 for back button and it worked!
;this menu system i am using with Model Pack 54 Achievement System (in my opinion one of the BESTS addons for FPSC) to create a difficulty system for the game
;and the hardest the difficulty level is, more achievements (mission objectives) will be avaiable to the player
;this creates a good gameplay for the player to enjoy, because he will be prized with more achievements, more enemies, and even more levels according to the
;difficulty level selected. And i am doing this without the need to create a pre-level to select the difficulty, everything inside the Game Title Menu
;also all the buttons have a click image swaped without the need to use GUI-X9 commands, only a lot of headaches and trial&error
;this menu idea is working perfectly for me, so if anyone find usefull this info, below comes the code.
;Cheers to all folks,
;007.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;State=0 is for basic setup
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;here we declare the difficulty variable that will be used to set the difficulty modes
:state=0:dimvar=difficulty
;here we declare the gamescore variable to be able to reset it`s value to 0 upon beginning a new game
:state=0:dimvar=GameScore
;here we declare the achievements variables for mission 0 to be able to reset it`s value to 0 upon beginning a new game
:state=0:dimvar=Ac0
;here we declare the achievements variables for mission 1 to be able to reset it`s value to 0 upon beginning a new game
:state=0:dimvar=Ac1,dimvar=Ac2,dimvar=Ac3,dimvar=Ac4,dimvar=Ac5
;base sound and video
:state=0:music=audiobank\My Game\menus\music.ogg
:state=0:backdropvideo=videobank\bgvideo.avi
;base image
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\backdrops\My Game\title_page.dds,hudmake=display
;base btns
:state=0:hudreset,hudx=70,hudy=50,hudimagefine=gamecore\backdrops\My Game\btn_base.dds,hudmake=display,hudname=btn_base_1
:state=0:hudreset,hudx=70,hudy=60,hudimagefine=gamecore\backdrops\My Game\btn_base.dds,hudmake=display,hudname=btn_base_2
:state=0:hudreset,hudx=70,hudy=70,hudimagefine=gamecore\backdrops\My Game\btn_base.dds,hudmake=display,hudname=btn_base_3
;new game btn
:state=0:hudreset,hudx=70,hudy=50,hudsizex=256,hudsizey=64,hudimagefine=gamecore\backdrops\My Game\btn_new.dds,hudtype=1,hudname=newgame,hudhide=1,hudmake=button
:state=0:hudreset,hudx=70,hudy=50,hudsizex=256,hudsizey=64,hudimagefine=gamecore\backdrops\My Game\btn_new_click.dds,hudtype=1,hudname=newgame_click,hudhide=1,hudmake=button
;load btn
:state=0:hudreset,hudx=70,hudy=60,hudsizex=256,hudsizey=64,hudimagefine=gamecore\backdrops\My Game\btn_load.dds,hudtype=2,hudname=loadgame,hudhide=1,hudmake=button
:state=0:hudreset,hudx=70,hudy=60,hudsizex=256,hudsizey=64,hudimagefine=gamecore\backdrops\My Game\btn_load_click.dds,hudtype=2,hudname=loadgame_click,hudhide=1,hudmake=button
;exit btn
:state=0:hudreset,hudx=70,hudy=70,hudsizex=256,hudsizey=64,hudimagefine=gamecore\backdrops\My Game\btn_exit.dds,hudtype=5,hudname=exitgame,hudhide=1,hudmake=button
:state=0:hudreset,hudx=70,hudy=70,hudsizex=256,hudsizey=64,hudimagefine=gamecore\backdrops\My Game\btn_exit_click.dds,hudtype=5,hudname=exitgame_click,hudhide=1,hudmake=button
;cursor
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\backdrops\My Game\pointer.dds,hudmake=pointer
;here we show the basic option buttons
:state=0:state=1
:state=1:hudshow=newgame,hudshow=loadgame,hudshow=exitgame
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;State=1 is for [NEW GAME], [LOAD GAME], [EXIT GAME]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;btn click action for new game
:state=1,hudselectionmade=1:state=99,hudunshow=newgame,hudshow=newgame_click,sound=audiobank\My Game\menus\btns_click.wav,timerstart
:state=99,timergreater=250:hudunshow=newgame_click,hudshow=newgame,state=10
;btn click action for load game
:state=1,hudselectionmade=2:state=98,hudunshow=loadgame,hudshow=loadgame_click,sound=audiobank\My Game\menus\btns_click.wav,timerstart
:state=98,timergreater=250:hudunshow=loadgame_click,hudshow=loadgame,state=1,loadgame
;btn click action for exit game
:state=1,hudselectionmade=5:state=97,hudunshow=exitgame,hudshow=exitgame_click,sound=audiobank\My Game\menus\btns_click.wav,timerstart
:state=97,timergreater=250:hudunshow=exitgame_click,hudshow=exitgame,quitgame,destroy
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;State=10 is for [EASY], [MEDIUM], [HARD], [BACK]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:state=10:hudunshow=newgame,hudunshow=loadgame,hudunshow=exitgame,state=11
;difficulty select
:state=11:hudreset,hudx=70,hudy=40,hudimagefine=gamecore\backdrops\My Game\btn_difficulty.dds,hudname=difficulty,hudmake=display
;back btn
:state=11:hudreset,hudx=90,hudy=50,hudsizex=64,hudsizey=64,hudimagefine=gamecore\backdrops\My Game\btn_back.dds,hudtype=7,hudname=back,hudmake=button
:state=11:hudreset,hudx=90,hudy=50,hudsizex=64,hudsizey=64,hudimagefine=gamecore\backdrops\My Game\btn_back_click.dds,hudtype=7,hudname=back_click,hudhide=1,hudmake=button
;easy mode
:state=11:hudreset,hudx=70,hudy=50,hudsizex=256,hudsizey=64,hudimagefine=gamecore\backdrops\My Game\easy.dds,hudtype=4,hudname=easy,hudmake=button
:state=11:hudreset,hudx=70,hudy=50,hudsizex=256,hudsizey=64,hudimagefine=gamecore\backdrops\My Game\easy_click.dds,hudtype=4,hudname=easy_click,hudhide=1,hudmake=button
;medium mode
:state=11:hudreset,hudx=70,hudy=60,hudsizex=256,hudsizey=64,hudimagefine=gamecore\backdrops\My Game\medium.dds,hudtype=6,hudname=medium,hudmake=button
:state=11:hudreset,hudx=70,hudy=60,hudsizex=256,hudsizey=64,hudimagefine=gamecore\backdrops\My Game\medium_click.dds,hudtype=6,hudname=medium_click,hudhide=1,hudmake=button
;hard mode
:state=11:hudreset,hudx=70,hudy=70,hudsizex=256,hudsizey=64,hudimagefine=gamecore\backdrops\My Game\hard.dds,hudtype=11,hudname=hard,hudmake=button
:state=11:hudreset,hudx=70,hudy=70,hudsizex=256,hudsizey=64,hudimagefine=gamecore\backdrops\My Game\hard_click.dds,hudtype=11,hudname=hard_click,hudhide=1,hudmake=button
;btn click action for new game easy mode
:state=11,hudselectionmade=4:state=96,hudunshow=easy,hudshow=easy_click,sound=audiobank\My Game\menus\btns_click.wav,timerstart
:state=96,timergreater=250:hudunshow=easy_click,hudshow=easy,setvar=difficulty 0,state=95
;reset GameScore
:state=95:setvar=GameScore 0
;reset variables for mission 0
:state=95:setvar=Ac0 0
;reset variables for mission 1
:state=95:setvar=Ac1 0,setvar=Ac2 0,setvar=Ac3 0,setvar=Ac4 0,setvar=Ac5 0
:state=95:newgame
;btn click action for new game medium mode
:state=11,hudselectionmade=6:state=94,hudunshow=medium,hudshow=medium_click,sound=audiobank\My Game\menus\btns_click.wav,timerstart
:state=94,timergreater=250:hudunshow=medium_click,hudshow=medium,setvar=difficulty 1,state=93
;reset GameScore
:state=93:setvar=GameScore 0
;reset variables for mission 0
:state=93:setvar=Ac0 0
;reset variables for mission 1
:state=93:setvar=Ac1 0,setvar=Ac2 0,setvar=Ac3 0,setvar=Ac4 0,setvar=Ac5 0
:state=93:newgame
;btn click action for new game hard mode
:state=11,hudselectionmade=11:state=92,hudunshow=hard,hudshow=hard_click,sound=audiobank\My Game\menus\btns_click.wav,timerstart
:state=92,timergreater=250:hudunshow=hard_click,hudshow=hard,setvar=difficulty 2,state=91
;reset GameScore
:state=91:setvar=GameScore 0
;reset variables for mission 0
:state=91:setvar=Ac0 0
;reset variables for mission 1
:state=91:setvar=Ac1 0,setvar=Ac2 0,setvar=Ac3 0,setvar=Ac4 0,setvar=Ac5 0
:state=91:newgame
;btn action for back
:state=11,hudselectionmade=7:state=90,hudunshow=back,hudshow=back_click,sound=audiobank\My Game\menus\btns_click.wav,timerstart
:state=90,timergreater=250:state=89,hudunshow=difficulty,hudunshow=back_click,hudunshow=easy,hudunshow=medium,hudunshow=hard
:state=89:quitgame,destroy
There is the code..and am using fps 1.13 and its the free version so i cant see File>Build in the menu