Using "after" on custom talking action

I’m trying to implement a simple “talk to” instead of asking and telling. I found an example that uses a table as follows:

Talking to it is an action applying to one thing.
Understand “talk to [thing]” as talking to it.
Understand “talking to [thing]” as talking to it.

Check talking to it when the noun is nontalkative:
say “[The noun] [aren’t] likely to answer you.” instead.

Carry out talking to it:
	repeat through the comment table of the noun:
		if there is a comment entry:
			say “[The noun] [say], ‘[comment entry]’[line break]”;
			blank out the whole row;
			stop the action;
			say “[The noun] [have] nothing left to say to you.”.

So this almost works. When I run out of things in the table, it just prints blank lines when I “talk to”, but the big issue is that I want to do something after talking to a particular character for the first time. What I’ve tried is this:

The Woman from The Bus is a Woman. "The woman from the bus is still here, gathering her belongings". She is in room1. She is talkative. The comment table of Woman from the bus is Table of passenger Comments.
After talking to the Woman from The Bus for the first time:
		Woman leaves in two turn from now; 
		continue the action.
At the time when woman leaves: say "The woman leaves for the nearest parking lot."; remove woman from the bus from play.

This gives me an error: “You wrote ‘After talking to the Woman from The Bus for the first time’, which seems to introduce a rule taking effect only if the action is ‘talking to the Woman from The Bus for the first time’. But that did not make sense as a description of an action. I am unable to place this rule into any rulebook.”

If I just use “After talking to for the first time:” it works, but of course it removes the woman even if I was talking to someone else.

Any idea what’s going on?

Thanks

I’ve run into a similar issue, and I’m pretty sure what’s going on is your use of “it” in the action name. From my (admittedly hazy) understanding, “it” in an action name flags to Inform that it applies to two things, with the “it” helping it out on knowing where the preposition goes (like, “putting it on” enables actions of the form PUT COIN ON DESK). So maybe try renaming your action to just “talking to” and see if that makes things work?

Edit: yeah, I had pretty much the exact same issue a couple months back.

The compiler is somewhat inconsistent about when you put “it” in the action name. For two-noun actions, you have to, but for one-noun actions, you shouldn’t.

So this works:

Talking to is an action applying to one thing.
Understand “talk to [thing]” as talking to.
Understand “talking to [thing]” as talking to.

After talking to the Woman from The Bus for the first time: ...

1 Like

The indent on this line is wrong, it needs to be at the same level as the repeat line. But I assume this was a transcription error – the quote style suggests that you retyped things rather than copy-pasting them into a code block?

Thanks, that did the trick