View previous topic :: View next topic |
Author |
Message |
KainMinter *~*

Joined: 10 Jan 2004 Posts: 155 Location: Austin
|
Posted: Thu Aug 12, 2004 2:27 pm Post subject: Menu Issues |
|
|
I'm having some frustrating problems...
1. I cant figure out how to disable the built in OHR menu.....
2. With the new plotscripting commands to call single portions of the menu, (item, equip, status, etc) I cant figure out how to keep the old menu to not come up after you exit from these.
Because of these two things, I cant complete the menu system in FFG.... can anyone please help me? I dont want to give up on Final Fantasy Gaiden's menu system just yet... that would suck. =( |
|
Back to top |
|
 |
MultiColoredWizard Come back, baby! The Breastmaster

Joined: 01 Feb 2003 Posts: 1232
|
Posted: Thu Aug 12, 2004 2:35 pm Post subject: |
|
|
that's easy, just put a loop that checks if alt or esc is pressed, then to make it do something else(ie bring up your menu). a commonly done way is making it auto-close the game. that's retarded. i'd put a blank textbox in if i ever planned to disable the keys |
|
Back to top |
|
 |
JSH357

Joined: 02 Feb 2003 Posts: 1705
|
Posted: Thu Aug 12, 2004 2:39 pm Post subject: |
|
|
Wiz... why not just use a wait(1)? A blank textbox? |
|
Back to top |
|
 |
Guest
|
Posted: Thu Aug 12, 2004 3:12 pm Post subject: |
|
|
the menu itself comes up fine, but the old menu comes up along with it...
also, if i say, select "items" with my menu, it pulls up the old item submenu (since making a new one would be overcomplicated). After im done, and i close the item menu using esc instead of "DONE", it goes directly to the old OHR main menu in the middle of the custom menu.
Allow me to provide some visual aids.
First, I open the menu.
After Selecting Items.
After hitting escape to exit the item menu. *pop*
Item, magic, and equipment all use the built in menu versions in part, so all three options would cause this mishap unfortunately.
What I really need is a command or something to disable the built in main menu from coming up at all, ever. That way I won't have to worry about that menu accidentally coming up anywhere in the game at all. |
|
Back to top |
|
 |
KainMinter *~*

Joined: 10 Jan 2004 Posts: 155 Location: Austin
|
Posted: Thu Aug 12, 2004 3:17 pm Post subject: |
|
|
err... guest == me. I could've sworn I was logged in. =\ |
|
Back to top |
|
 |
*Worthy* Critical Thinker

Joined: 11 Aug 2003 Posts: 186
|
Posted: Thu Aug 12, 2004 3:30 pm Post subject: |
|
|
I don't know if it's possible without suspending the player. Even if something happens when "esc" is pressed, the menu should come up in addition to it. And, even if it solves the first problem, I doubt it will the second. You could just suspend the player throughout the entire game and include something like this:
Code: |
suspend player
while (something==0) then
(
if (key is pressed(key:UP)) then
(
walk hero (me,north,1)
wait for hero (me)
)
if (key is pressed(key:DOWN)) then
(
walk hero (me,south,1)
wait for hero (me)
)
if (key is pressed(key:RIGHT)) then
(
walk hero (me,east,1)
wait for hero (me)
)
if (key is pressed(key:LEFT)) then
(
walk hero (me,west,1)
wait for hero (me)
)
if (key is pressed(key:ESC)) then
(
show text box (#) #ASKING IF THE PLAYER WANTS TO QUIT
wait for text box
if (checktag(tag:quit)==ON) then
(
#whatever you want to happen for a game over
game over
)
)
#INCLUDE ANY OTHER KEY COMMANDS HERE (SUCH AS BRINGING UP YOUR CUSTOM MENU)
wait
)
end
|
You will also have to develop a way to active NPCs and doors, which I can explain how if you would like; I had to do that for one of my games. I could just send you my script which is basically exactly what you will be doing. Hopefully, however, I am wrong and MCW's way works perfectly, because this way would present a hassle...although it is possible and doesn't have any lag. Contact me if nothing else works and I will show you the script for activating NPCs & doors via scripting, if you need the help.
Uhh...hope this helps?
~Worthy _________________ You can do whatever you want...but prison is full of people who make bad decisions. |
|
Back to top |
|
 |
KainMinter *~*

Joined: 10 Jan 2004 Posts: 155 Location: Austin
|
Posted: Thu Aug 12, 2004 3:47 pm Post subject: |
|
|
hmm... well, I'll try suspending the player within the menu. the pointer is an NPC in this case so that should be okay. thanks ^_^
As for the rest of the game outside of the menu, I'll try to see if I can make MCW's way work.. if I cant, I'll just make a different key scheme and appoint esc as quit game instead of the menu/back button (as he sorta anti-suggested). Even though it may be the "retarded" way out... if its my only option, I'll just have to take it --_--
( James, I hope you consider making a disable menu plot script command one day. I'd be forever grateful. ^_~ ) |
|
Back to top |
|
 |
KainMinter *~*

Joined: 10 Jan 2004 Posts: 155 Location: Austin
|
Posted: Thu Aug 12, 2004 4:44 pm Post subject: |
|
|
Okay, an update::
Thank you Worthy, the pesky old menu no longer comes up in the new menu. Your suggestion of suspend player helped me there greatly!!
Unfortunately, MCW, your method didn't help. I tried moved the new menu's button to "ESC", with that now only the old menu would open, and the new one would fail to open 60% of the time. This is unfortunate... I cant even reliably set ESC to be a instant quit this way... Do you think I am programing it wrong? Could you post some code on how you think it should be done? |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Thu Aug 12, 2004 5:03 pm Post subject: |
|
|
Surprised it took so much arguing...
The ONLY way to prevent the default menu from coming up to to suspend player. Thankfully, on-key-press scripts are called before the menu is called. 'So?' you say, 'That would only help me if ESC caused a gameover script'.
The solution is simple:
Code: |
script, onkeypress, begin
if (key is pressed (key: esc)) then (
suspend player
wait (1)
resume player
#run custom menu
...
)
end
|
When ESC is pressed, this script is run first, it suspends player, then waits a tick. So control gos to game.exe's keypress handler, which finds that ESC has been pressed. But the player is suspended, so it doesn't bring up the menu. Next tick, control gos back to your script and your menu is run. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
KainMinter *~*

Joined: 10 Jan 2004 Posts: 155 Location: Austin
|
Posted: Thu Aug 12, 2004 5:32 pm Post subject: |
|
|
Wow.. thank you very much. I'll give it a try when i get home, since i already packed up the laptop. If this works, you are my hero. =P |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Thu Aug 12, 2004 5:56 pm Post subject: |
|
|
I tried out that script (minus the custom menu) on a test game, and it successfully stopped the menu coming up, except when the player holds down ESC. But this should not be hard to fix. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
KainMinter *~*

Joined: 10 Jan 2004 Posts: 155 Location: Austin
|
Posted: Fri Aug 13, 2004 7:51 am Post subject: |
|
|
Code: |
script, checkkeys, begin
if (key is pressed (01),or, key is pressed(56)) then (
suspend player
wait (1)
#run custom menu
Menu
#on return, Resume play
resume player
)
end
|
It worked, 100%. Even holding the ESC button won't open it now. Thanks MadCacti!! ^o^ |
|
Back to top |
|
 |
|