However I7 will only let you say " If the player consents: (do
something )
It would be nice to have if he player dissents: (do something)
I want the player to be able to say yes or no to each question in
succession and if the
player says NO to any question the routine ends rather than null
output which looks
absolutely crappy:
I want the player to be able to say NO after refusing the breakfast
offer or the pancake or bacon offers
as well and have the routine end but can't figure it out.
Code follows:
<Code>
"Conversation Test"
a thing can be open.
a thing can be closed.
To say (j - a number) spaces:
(- spaces({j}); -).
to say /l: say line break.
to say /p: say paragraph break.
use full-length room descriptions.
talking to is an action applying to one visible thing.
understand "talk to [someone]" as talking to.
YourSeat is a room.
The printed name is "Your Seat on the Plane.".
"You are sitting in your seat in the plane.
[if traytable is visible] There is a tray table in front of you with a
tray on it.[end if]"
an supporter called an empty seat is in YourSeat.
"There is an empty seat next to you."
a panel is in yourseat.
"There is a panel here with a call button on it.".
the description is "The panel has a single button on it.".
a call button is on the panel.
the description is "The button has an icon of a stewardess on it.".
the button is either pushed or unpushed.
the button is unpushed.
after deciding the scope of the player while in YourSeat:
place Sandy in scope.
instead of talking to Sandy when the call button is unpushed:
say "She's too far up the aisle to hear you. Push the call button.".
after looking in YourSeat:
if the breakfast tray is not visible begin;
say "A uniformed stewardess is in the aisle serving breakfast.";
otherwise;
say "There is a tray of breakfast here (on the tray table).[/l]
There is some Cream of Mystery Soup (on the tray).";
end if.
instead of pushing the call button:
now the call button is pushed;
now Sandy is in YourSeat;
say "The stewardess shows up and asks you: Would you care for
breakfast this morning?";
if the player consents,
say "Would you like pancakes?";
if the player consents,
say "Sorry we're out of pancakes how about bacon and eggs?";
if the player consents,
say "We're out of bacon and eggs? how about Chef's surprise?";
if the player consents begin;
now the traytable is open;
now the traytable is in YourSeat;
now the breakfast is on the traytable;
say "The attendant lowers your tray table and puts a tray of food in
front of you. She goes on down the aisle to the next row...[/p]
[15 spaces] - Good morning, would you care for breakfast this
morning?";
otherwise;
end the game saying "She's totally fed up with you and the game is
over man!";
end if.
Storage is a room.
A woman called Sandy is in Storage.
Sandy is scenery.
understand "stu" or "woman" or "girl" or "lady"
or "stew" or "stewardess" or "gal" as Sandy.
the description of Sandy is
"The stewardess is wearing the usual airline uniform.
A blue jump suit, blue apron, red scarf and a white chef's hat with
small
as cunningly worked into the fabric. Her name tag says - Sandy[/l]"
a supporter called a breakfast tray is in Storage.
the breakfast tray is either served or unserved.
the breakfast tray is unserved and scenery.
a supporter called a traytable is scenery in Storage.
understand "table" as the traytable.
a bowl of soup is on the breakfast tray.
a fish is in the soup.
<code>
You can define that by writing
To decide if the player dissents:
if the player consents, no; otherwise yes.
> You can define that by writing
>
> To decide if the player dissents:
> if the player consents, no; otherwise yes.
OK but that only works if the player rejects the breakfast offer.
I can't see a way to incorporate it into the code block where the
player is offered other choices.
I need to be able to say yes or no to each offering:
1. Pancakes
2. Bacon-eggs
3. Chef's surprise.
> I can't see a way to incorporate it into the code block where the
> player is offered other choices.
>
> I need to be able to say yes or no to each offering:
> 1. Pancakes
> 2. Bacon-eggs
> 3. Chef's surprise.
I don't think that you can use "if the player consents" as you have,
because each "if the player consents" represents a new turn, and so it
doesn't make sense to use it multiple time within the same rule or code
block. The easiest thing would probably be to use or adapt the Questions
extension, which allows just the sort of script you want to write.
--Erik
> I don't think that you can use "if the player consents" as you have,
> because each "if the player consents" represents a new turn, and so it
> doesn't make sense to use it multiple time within the same rule or code
> block. The easiest thing would probably be to use or adapt the Questions
> extension, which allows just the sort of script you want to write.
Thanks much. I've incorporated it into the game and am working out
how
to structure the new code for the question asking.