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

Close Menu doesn't work

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Chenzi
User was banned for this post




Joined: 02 Aug 2003
Posts: 190
Location: Grand Rapids, MI

PostPosted: Sat Jul 19, 2008 4:10 pm    Post subject: Close Menu doesn't work Reply with quote

I can't get the function Close Menu to work. I've updated to the latest nightly as of 7/18/08, and no luck.

Essentially, I need to have it so when you select something on a menu, every menu (usually 2-3 menus are open) including the top menu that had something selected on it, needs to close, so, I bootleggedly tried this:
Code:
 
plotscript, closeallmenus,begin
close menu(0)
close menu(1)
close menu(2)
close menu(3)
close menu(4)
close menu(5)
close menu(6)
close menu(7)
close menu(8)
close menu(9)
close menu(10)
end


What's supposed to happen:
When you select something on the menu, it runs a different script that ends up calling closeallmenus, then displays a textbox. So, all menus (well, 0-10) should close, then the text box should display on screen immediately.

What's happening instead:
You select something on the menu, nothing visually happens. Hit ESC a few times to get out of the 3 menus that you're in, the text box appears.

Any idears, or did I find another bug?
_________________
Allow me to preemptively disclose that I probably hate the person posting below, including myself.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
TMC
On the Verge of Insanity




Joined: 05 Apr 2003
Posts: 3240
Location: Matakana

PostPosted: Sat Jul 19, 2008 4:37 pm    Post subject: Reply with quote

Read the documentation carefully: closemenu and most other menu commands take menu handles and menu item handles. These are not ID numbers, they are unique numbers assigned to each existing menu/menu item.

Anyway, what you want is
Code:
plotscript, closeallmenus, begin
  while (top menu) do (close menu (top menu))
end


If your textbox doesn't appear, then I'm betting you forgot to turn on the "Allow Gameplay and Scripts" bit on the menus. Without this, the triggered script is not actually run until the menu is closed.
_________________
"It is so great it is insanely great."


Last edited by TMC on Sat Jul 19, 2008 4:40 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Chenzi
User was banned for this post




Joined: 02 Aug 2003
Posts: 190
Location: Grand Rapids, MI

PostPosted: Sat Jul 19, 2008 4:39 pm    Post subject: Reply with quote

<3 <3 <3

I'm pretty sure I tried something like that, but I'll give it a shot with what you posted. I'll be here complaining if it didn't work out.
_________________
Allow me to preemptively disclose that I probably hate the person posting below, including myself.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chenzi
User was banned for this post




Joined: 02 Aug 2003
Posts: 190
Location: Grand Rapids, MI

PostPosted: Sat Jul 19, 2008 5:22 pm    Post subject: Reply with quote

Yes, still having issues. Discussing it on IRC, I'll post here if we find the problem (replying for archival purposes).
_________________
Allow me to preemptively disclose that I probably hate the person posting below, including myself.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
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