Quote: "I have one more question...
I want the user to press Q and he will be transported to Game's Main Menu.
STATE=0,SCANCODEKEYPRESSED=X:QUITGAME
BUT QUITGAME action quits the WHOLE game... How can u script so it quits to main menu NOT the whole game???????????????????????????????????????????????"
I hope you mean when we have died and have the menu up, otherwise hitting 'Q' accidently during game play would exit automatically and really make people angry.
So, lets look at what the Exit does and emulate it. (it does not QUITGAME)
Quote: "
; Game Menu
:state=2,escapekeypressed=0:state=3
:state=3:hudshow=gamemenutitle,hudshow=loadgame,hudshow=savegame,hudshow=quitgame,hudshow=returngame,hudshow=pointer,state=4
:state=4,hudselectionmade=2:loadgame
:state=4,hudselectionmade=3:savegame,state=6
:state=4,hudselectionmade=5:continuegame,destroy
:state=4,hudselectionmade=4:state=6
:state=4,scancodekeypressed=16:continuegame,destroy
:state=4,escapekeypressed=1:state=5
:state=5,escapekeypressed=0:state=6
:state=6:hudunshow=gamemenutitle,hudunshow=loadgame,hudunshow=savegame,hudunshow=quitgame,hudunshow=returngame,hudunshow=pointer,resumegame,state=7
:state=7,plralive=1:state=1
"
We can see in the line in italics what the menu does when someone selects "Exit Game" which takes them back to the Main Menu as you call it.
:state=4,hudselectionmade=5:continuegame,destroy
It doesn't QUITGAME, it continues and destroys.
So that is what we want to do is someone presses 'Q', right? (scancodekeypressed=16)
So we add the line in bold right above the check for the escape key...
:state=4,scancodekeypressed=16:continuegame,destroy