how do i...?
kidkunjer
09 Sept 2011, 14:20is there any way to easily force the player to leave a room at any given time, where they can choose which way they want to go but can no longer do anything else other than leave it?
that would be great
that would be great

The Pixie
09 Sept 2011, 15:07How do you envisage that from the player's perspective? Are you thinking that any other action gets a response saying you cannot do it? Alternatively, when the room becomes like that, the player sees a menu, and all she can do is choose which exit.
kidkunjer
09 Sept 2011, 16:18i mean the second one 

The Pixie
09 Sept 2011, 18:38Good, because the second way will be easier (somewhat).
You need to set up a script that will get run at the appropriate time. This is not the slickest way, but may be the simplest.
Create a new attribute on the room that is a string list, called "exits", and add to that a list of exit names.
I do not know what triggers this, but it needs to start a script. I am not sure how to do this through the GUI (Alex, can you set a variable from a function call through the GUI?), so it is into code mode. To show the menu use this:
ex = ShowMenu ("Which way do you go?", exits, false)
Now you need to move the player, depending on the value of ex. This will look something like this:
if (ex = "East") {
MoveObject(player, room_to_the_east)
}
Here, room_to_the_east is the name (not alias) of the room in that direction, and "East" is the direction as listed in the exits attribute. You need to have one of these for every direction the player can take.
I hope you can follow that!
You need to set up a script that will get run at the appropriate time. This is not the slickest way, but may be the simplest.
Create a new attribute on the room that is a string list, called "exits", and add to that a list of exit names.
I do not know what triggers this, but it needs to start a script. I am not sure how to do this through the GUI (Alex, can you set a variable from a function call through the GUI?), so it is into code mode. To show the menu use this:
ex = ShowMenu ("Which way do you go?", exits, false)
Now you need to move the player, depending on the value of ex. This will look something like this:
if (ex = "East") {
MoveObject(player, room_to_the_east)
}
Here, room_to_the_east is the name (not alias) of the room in that direction, and "East" is the direction as listed in the exits attribute. You need to have one of these for every direction the player can take.
I hope you can follow that!
Alex
09 Sept 2011, 19:33
Alex, can you set a variable from a function call through the GUI?
Yes, just choose "expression" for the value and type in the function call.