Speaking to a person in a container

Hi again everyone. I hope all of you that have Thanksgiving had an opportunity to spend time with your families.

I’m still plugging away and I’ve run into an issue which I can’t figure out, probably because of something I’ve done earlier.

I have a person in a cage/jail and they are intentionally not recognizable which is to say they are a figure, or black-clad figure or whatever.

What I want to happen is that someone can talk to them when they are in the cage/jail and at that point they will reveal themselves.

In my head I could say something like…

understand "figure" as whip.

Whip is the actual person.

I know that this code is not correct and I have tried many, many other things from recipes etc. which I why I think maybe my other code is somehow interfering with this somehow.

I’ve even tried

instead of "talking to [someone]" when the player is in the alcove and whip is not woken:
    say "Hello I'm Mrs Whip. It's nice to see you.";

Which in my head would be talking to anyone you can talk to and interpreting it as talking to this mystery person. I’ve tried many variations of this as well.

I’m probably doing something wrong as I’ve lifted my speaking thing from another game that it worked in.

I hope this is enough information for someone to help.

The line

Understand "figure" as Whip.

should definitely work.

The line

Instead of "talking to [someone]" ...

would not work, because 1) you wouldn’t use quotes to describe the action to which the rule is applied, and 2) unless you have specifically created a talking to action (or a talking to someone kind of action, which may or may not be accepted by the compiler) then the compiler wouldn’t know what you meant by Instead of talking to someone when...

It’s hard to say whether other code is interfering at this point.

It would be helpful if you could describe or provide a sample transcript of the type of speaking you would like to have. Are you planning to use the ASK/TELL model? Do you want to respond to things like >FIGURE, WHO ARE YOU?

1 Like

I’ve got the following for my talking. I’m not going all out on the talking, just responding to a general talking.

Everyone has a single response or possibly a couple but only in a “for the first time” “for the second time” etc.

Talking to is an action applying to one thing. Understand "talk to/with/at/-- [something]" or "talk [something]" as talking to.

whispering is an action applying to one visible thing.

understand  "whisper to [someone]" as whispering.

yelling is an action applying to one visible thing.

understand  "yell at [someone]" as yelling.

cursing is an action applying to one visible thing.

understand  "curse at [someone]" as cursing.

screaming is an action applying to one visible thing.

understand  "scream at [someone]" as screaming.

Understand the commands "answer" or "say" or "shout" or "speak" or "ask" or "tell"  or "whisper" or "yell" or "curse" or "scream" as something new. [remove all associations from Standard Rules]

Understand  the commands "answer" or "say" or "shout" or "speak" or "ask" or "tell" or "whisper" or "yell" or "curse" or "scream" as "talk".

Check talking to something that is not a person (this is the inanimate things don't talk rule):
	say "There is no reply.";
	stop the action.

Report talking to a person (this is the some people don't have much to say rule):
	say "[The noun] [don't] seem to have much to say." [generic default response]
Talking too much to it about is an action applying to one thing and one topic. Understand "talk to/with/at/-- [something] about/that/saying/-- [text]" as talking too much to it about. Understand "talk [text] to/with/at [something]" or "talk about/that [text] to/with/at [something]" as talking too much to it about (with nouns reversed).

Instead of talking too much to something about something (this is the ignore content of communication rule):
	try talking to the noun instead.
After talking to Whip for the first time:
	say "[quotation mark]If I weren't still mad at you for abandoning me here a year ago, I'd be happy to see you.[quotation mark][paragraph break][quotation mark]That's fair[quotation mark], you think to yourself.[paragraph break][quotation mark]Anyway,[quotation mark] she continues [quotation mark]they're about to burn me alive. Get me out of here and we'll call it even. Can you believe they think I'm a witch?[quotation mark][paragraph break]Fortunately, you think, she doesn't appear to want an answer because, if you were being honest, a witch is exactly what you've always thought she was. Choosing to dress herself in layered black cloth has just helped the villagers to recognise that fact more quickly...[paragraph break][quotation mark]Hello... hello... is this a rescue or what?![paragraph break][if the cage is closed]Can you get that lock off, I don't think we have that much time?";
	now whip is woken.

After talking to Whip: [use after rules to replace generic response]
	say "Mrs. Whip says 'You know, [one of]if books are not good company, where will I find it?[or]a reader lives a thousand lives before he dies . . . The person who never reads lives only one.[or]Mark Twain said a so called 'Classic’, a book which people praise and don’t read[or]golf… is the infallible test. The man who can go into a patch of rough alone, with the knowledge that only God is watching him, and play his ball where it lies, is the man who will serve you faithfully and well.[at random]'".

[After talking to Gordon:
	say "Gordon says 'Isn't everything just the best?!'".]

After talking to the hermit crab:
	say "[one of]Your little pincered buddy regards you quizzically.[or]You're sure this fine crustacean can understand you, they just don't have the facility to speak.[or]They're not much of a talker, but they are a great listener.[or]The little guy bobs their eye stalks then peers at you.[at random]"

Talking too little is an action applying to one topic. Understand "talk [text]" as talking too little.

Check talking too little (this is the must speak to a specific person rule):
	say "Just talking to the air isn't likely to be useful." (A)
Definition: A person is non-PC if it is not the player.

Instead of talking too little when the player can see exactly one non-PC person (called listener) (this is the when only one other person is present talk to that person rule):
	try talking to listener instead.

OK, then a rule of the form

Instead of talking to Whip when...

should work.

It’s important to keep in mind the difference between what the compiler understands when reading your source code and what the parser will understand when reading player input. (I will admit to having been confused about this myself when I first started with I7, because much is done to automatically align these in many cases.)

In this case, the Understand as... line tells the parser to understand a command like >X FIGURE to be translated to an examining Whip action for action processing.

Okay. Thank you.

So this combo works, but if whip is in the cage ( a container) she can’t hear me talking to her. Is it possible to talk to someone in a container?

understand "figure" as whip.

Instead of talking to whip when the player is in the alcove:
     say "hello there".

I’m not sure I understand what you mean by “she can’t hear me talking to her.” Can you post an example of the transcript?

If the container is closed and also transparent, then you may be having some trouble related to touchability.

Incidentally, on the topic of other code potentially interfering, the >ACTIONS and >RULES debugging commands can be very useful for illustrating exactly how an action is being processed.

EDIT: If touchability is the issue, then you might find the simplest solution to be changing the action declaration to:

Talking to is an action applying to one visible thing.
1 Like

Your container doesn’t need to be a real Inform container. Fake it.

Lab is a room. "There's a clear box here containing a person named Whip."

Whip is a person in Lab. She is scenery. The description is "Whip is in a clear box and can't get out."

The clear box is here. It is scenery. The description is "A box containing Whip.".


ETA: You’d have to add some restrictive rules about giving things, etc, but that’s pretty easy.