 |
Castle Paradox
|
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
|
Posted: Sat Jul 19, 2008 4:10 pm Post subject: Close Menu doesn't work |
|
|
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 |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Sat Jul 19, 2008 4:37 pm Post subject: |
|
|
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 |
|
 |
Chenzi User was banned for this post

Joined: 02 Aug 2003 Posts: 190 Location: Grand Rapids, MI
|
Posted: Sat Jul 19, 2008 4:39 pm Post subject: |
|
|
<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 |
|
 |
Chenzi User was banned for this post

Joined: 02 Aug 2003 Posts: 190 Location: Grand Rapids, MI
|
Posted: Sat Jul 19, 2008 5:22 pm Post subject: |
|
|
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 |
|
 |
|
|
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
|