View previous topic :: View next topic |
Author |
Message |
cavemanerick

Joined: 03 Aug 2008 Posts: 74
|
Posted: Fri Aug 21, 2009 11:27 am Post subject: menu issue... |
|
|
Well i've recently added a fire scene to my town where the town is on fire, anyways the thing is in my plotscripting i bring up a menu (14) and make it invisible so people can't save while in the burning village as if they do when they reload the map all the fire goes away so to avoid this major problem i've made the saving impossible while inside the brunign village. Heres my problem tho i've open and closed menus before in my game with plot scripting but this time the program is completely not responding to my closing menu commands. Heres my script and for some reason even though i set the menu's setting exactly to the same as the one before i open and closed through commands it still won't close i've been messing with this for a few days and its really started to be a problem so if you wouldn't mind i'd like some ideas on why its doing this, Heres my script for closing it. This is on an invisible npc that you step on to call the script. Any ideas would be appreicaited.
Code: |
plotscript,dangerous,begin
close menu(14)
close menu
suspend player
walk hero (me,east,1)
resume player
close menu(14)
close menu
end |
The extra close menu commands are there because it was getting soo annoying i thought maybe if i added more the program would get the hint in trying to close the stupid menu but allas it did not.
Last edited by cavemanerick on Fri Aug 21, 2009 12:29 pm; edited 1 time in total |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Fri Aug 21, 2009 11:45 am Post subject: Re: menu issue... |
|
|
cavemanerick wrote: | The extra close menu commands are there because it was getting soo annoying i thought maybe if i added more the program would get the hint i'm trying to close the stupid menu but allas it did not. |
Haha, fantastic.
You probably want to use allow save anywhere(false) for this. Much simpler than locking the player out of the menu. _________________
|
|
Back to top |
|
 |
cavemanerick

Joined: 03 Aug 2008 Posts: 74
|
Posted: Fri Aug 21, 2009 12:32 pm Post subject: thanks again |
|
|
Thanks that works good thing to remeber to use next time too i suppose. |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Fri Aug 21, 2009 1:25 pm Post subject: |
|
|
Moogle is right on this. His way is much simpler.
Just for information, close menu is exactly the same as close menu(0)
The close menu command does NOT take a menu ID number, it takes a handle returned by "open menu" or "find menu"
Code: |
variable(m)
m := open menu(14)
# do some stuff with the menu
close menu(m)
|
|
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Fri Aug 21, 2009 7:34 pm Post subject: |
|
|
Clearly close menu ought to default to closing the topmost menu. _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Mon Aug 24, 2009 7:32 am Post subject: |
|
|
The Mad Cacti wrote: | Clearly close menu ought to default to closing the topmost menu. |
That can be done with this:
Code: |
close menu(top menu)
|
But I guess we could make close menu's argument default to -1 and handle that as a special case to close the top menu. |
|
Back to top |
|
 |
|