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

main menu and suspend player

 
Post new topic   Reply to topic    Castle Paradox Forum Index -> HELP!
View previous topic :: View next topic  
Author Message
Bagne
ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA




Joined: 19 Feb 2003
Posts: 518
Location: Halifax

PostPosted: Sun May 02, 2010 11:24 am    Post subject: main menu and suspend player Reply with quote

I need to let the player access the main menu while "suspend player" is in effect.

How do you do this?

I've got a keypress script, and it looks like this:

Code:
IF (KEY IS PRESSED: ESC) THEN(
  IF (TOP MENU == 0) then(
    OPEN MENU(0) # this is the main menu
  )
  ELSE
    CLOSE MENU(TOP MENU)
  )
END #IF esc is pressed


But ... this only half works because TOP MENU seems to be returning false even if the main menu is open :-(

Is there a command that closes menus using an ID rather than a handle?
Is there a way of getting the Main Menu's handle?

me <- Frustrated Angry Face
_________________
Working on rain and cloud formation
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: Sun May 02, 2010 11:35 am    Post subject: Reply with quote

Is your main menu configured to allow gameplay and scripts?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bagne
ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA




Joined: 19 Feb 2003
Posts: 518
Location: Halifax

PostPosted: Sun May 02, 2010 11:47 am    Post subject: Reply with quote

No, the bitset is off.
What does it do?

Hm ... on second examination, I might be manufacturing my own problems here ...

Here's the full story ... I've got a script that looks like this:

Code:
SUSPEND PLAYER
WHILE (1) DO(

... keypress stuff ....

IF (KEY IS PRESSED: ESC) THEN(
  IF (TOP MENU == 0) then(
    OPEN MENU(0) # this is the main menu
  )
  ELSE
    CLOSE MENU(TOP MENU)
  )
END #IF esc is pressed
wait(1)
END


What happens is when I hit esc, the main menu opens, then, if I hit esc when the menu is open, I think it closes, and reopens again.

So ... by hitting esc to close the main menu, am I re-triggering it to open?
_________________
Working on rain and cloud formation
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: Sun May 02, 2010 4:09 pm    Post subject: Reply with quote

If a menu has the "Allow Gameplay and Scripts" bitset OFF then the menu completely freezes the script until you exit the menu. Then the script continues right after the "open menu" command.

If a menu has the "Allow Gameplay and Scripts" bitset ON then the script continues running while you use the menu. This more is required for most menu manipulation commands to work at all.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bagne
ALL YOUR NUDIBRANCH ARE BELONG TO GASTROPODA




Joined: 19 Feb 2003
Posts: 518
Location: Halifax

PostPosted: Tue May 04, 2010 1:27 pm    Post subject: Reply with quote

Does "suspend player" prevent the player from closing the main menu if it's already open?
_________________
Working on rain and cloud formation
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: Tue May 04, 2010 8:28 pm    Post subject: Reply with quote

Suspend player just stops you from opening the menu. It has no other impact on munu contols.
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