Disable other actions while at a menu

suzums
25 Mar 2013, 07:28I want to make it so when presented with a menu, the player can't ignore it and do other actions. They should HAVE to pick an option from the menu before they can do anything else. Does anybody know how to accomplish this?
For example, say the player enters a room and there's a big scary monster. A menu presents them with two options: Fight, or Run Away.
As it stands currently, the player can ignore those options and just leave the room, or look around and take stuff, or whatever.
How do I FORCE them to pick an option, and disregard anything else they do in the meantime?
For example, say the player enters a room and there's a big scary monster. A menu presents them with two options: Fight, or Run Away.
As it stands currently, the player can ignore those options and just leave the room, or look around and take stuff, or whatever.
How do I FORCE them to pick an option, and disregard anything else they do in the meantime?
Cress
25 Mar 2013, 10:58I do not know off the top of my head about making a menu option. (I am very new to this and learning as i need to).
However you can make it so when a player enters the room you can 'lock' the exits and when they choose fight or fly they will unlock. you can set a flag for this, or you can put:
when object monster dead move object monster to object spare room . if object monster is in spare room unlock exit.
In my current game I use both flags and the if object is in spare room.
Think you can play about with the exit visible and invisible option too.
However you can make it so when a player enters the room you can 'lock' the exits and when they choose fight or fly they will unlock. you can set a flag for this, or you can put:
when object monster dead move object monster to object spare room . if object monster is in spare room unlock exit.
In my current game I use both flags and the if object is in spare room.
Think you can play about with the exit visible and invisible option too.
TriangleGames
25 Mar 2013, 10:59We were actually discussing this recently, over here: New Menus in 5.4
Previous versions used "pop-up" menu's, so this is sort of a new problem. There are a couple of options in that topic thread which basically amount to
1) Hide the command line and panes, so the player can't use them (player must use mouse to click on choice)
2) Create a menu that loops if the player doesn't make a valid choice (player can use keyboard)
We may still want to find a more "permanent" solution, but for now I believe these are your basic options. Additional questions should probably be posted in the other thread, just to consolidate the conversation.
EDIT: Cress makes some new suggestions that are not in the other topic. Building on his ideas, you could move the player into a "MenuRoom" without any exits or objects, where a turn script repeats the menu and the only way out of the room is to make a valid choice.
Previous versions used "pop-up" menu's, so this is sort of a new problem. There are a couple of options in that topic thread which basically amount to
1) Hide the command line and panes, so the player can't use them (player must use mouse to click on choice)
2) Create a menu that loops if the player doesn't make a valid choice (player can use keyboard)
We may still want to find a more "permanent" solution, but for now I believe these are your basic options. Additional questions should probably be posted in the other thread, just to consolidate the conversation.
EDIT: Cress makes some new suggestions that are not in the other topic. Building on his ideas, you could move the player into a "MenuRoom" without any exits or objects, where a turn script repeats the menu and the only way out of the room is to make a valid choice.
Cress
25 Mar 2013, 11:47Thanks, had not of thought of making a menu room 


suzums
26 Mar 2013, 00:28TriangleGames wrote:We were actually discussing this recently, over here: New Menus in 5.4
Previous versions used "pop-up" menu's, so this is sort of a new problem. There are a couple of options in that topic thread which basically amount to
1) Hide the command line and panes, so the player can't use them (player must use mouse to click on choice)
2) Create a menu that loops if the player doesn't make a valid choice (player can use keyboard)
We may still want to find a more "permanent" solution, but for now I believe these are your basic options. Additional questions should probably be posted in the other thread, just to consolidate the conversation.
EDIT: Cress makes some new suggestions that are not in the other topic. Building on his ideas, you could move the player into a "MenuRoom" without any exits or objects, where a turn script repeats the menu and the only way out of the room is to make a valid choice.
I've tried hiding the command line and panes, but hyperlinks in the room description are still there. Players can still click on them and do things, which totally breaks stuff and defeats the purpose of the menus. I'll try the while loop idea.
Locking the exits might be difficult, however. And the MenuRoom idea might work for simple applications, but it would be a lot of work for something like what I'm trying to do. I have a dungeon, and after the player sets off a trap, a monster comes and finds them after a few turns. When the monster approaches them, they have a menu of options: Run away, Try to reason with it, or Fight it. As such, the menu is called from a turn script. Which means it can happen in any room in the dungeon. Moving the player to a separate MenuRoom would just complicate things further. Not saying it can't be done, it's just... there's a got to be a simpler way to do this. Why can't ShowMenu just make the game disregard anything else going on until the player picks something? That would be ideal.