Castle Paradox Forum Index Castle Paradox

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Gamelist   Review List   Song List   All Journals   Site Stats   Search Gamelist   IRC Chat Room

menu issue...

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Fri Aug 21, 2009 11:27 am    Post subject: menu issue... Reply with quote

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
View user's profile Send private message
Moogle1
Scourge of the Seas
Halloween 2006 Creativity Winner
Halloween 2006 Creativity Winner



Joined: 15 Jul 2004
Posts: 3377
Location: Seattle, WA

PostPosted: Fri Aug 21, 2009 11:45 am    Post subject: Re: menu issue... Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
cavemanerick




Joined: 03 Aug 2008
Posts: 74

PostPosted: Fri Aug 21, 2009 12:32 pm    Post subject: thanks again Reply with quote

Thanks that works good thing to remeber to use next time too i suppose.
Back to top
View user's profile Send private message
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Fri Aug 21, 2009 1:25 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Fri Aug 21, 2009 7:34 pm    Post subject: Reply with quote

Clearly close menu ought to default to closing the topmost menu.
_________________
"It is so great it is insanely great."
Back to top
View user's profile Send private message Send e-mail
Bob the Hamster
OHRRPGCE Developer




Joined: 22 Feb 2003
Posts: 2526
Location: Hamster Republic (Southern California Enclave)

PostPosted: Mon Aug 24, 2009 7:32 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP! All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group