[SOLVED] Executing action after/before starting conversation

Can’t seem to figure this one out.

I am using ‘Include Patrollers by Michael Callaghan.’ But that is not the problem. This is part of the code:

Ada Lonstrøm is a female patroller in Section 4-4. The Drive of Ada Lonstrøm is 100. Carry out going to Section 4-4 for the first time: Activate Ada Lonstrøm.
This basically creates an NPC who starts walking after entering Section 4-4. Now when I want to talk to her I don’t want Ada to walk away. So far she does.

So I tried this:

Before telling Ada Lonstrøm about something for the first time: Say "I am tired of walking aimlessly."; Deactivate Ada Lonstrøm.
It doesn’t seem to work. ‘Deactivate’ is supposed to stop the girl from wandering around. The “Say” line is just there to see whether the Before-rule is triggered. It is not.

What am I doing wrong?

BiB

Try typing the debugging command “RULES” before you tell Ada about something. “RULES” will make Inform tell you what rules the command runs. That way you might be able to figure out what stops this before rule from running. (To turn it off, type “RULES OFF”.)

Try removing the “for the first time” clause.

Did it. Same result. Unfortunately. Thanks for the idea, though. :slight_smile: Keep 'em coming. PLEASE!

Did that. The result:

> talk to ada [Rule "display topic suggestions on explicit greeting rule" applies.] [Rule "note current interlocutor when greeted rule" applies.] [Rule "standard report greeting rule" applies.] [Rule "default greeting rule" applies.] You say hello to Ada Lonstrøm.
Sorry for an incredibly stupid question: does this help me somehow? :confused:

BiB

The problem is that conversation incorporates a very large number of different actions. “Telling Ada about something” might not even map to a successful action - you may have to phrase it as “Telling Ada about a topic.”

“talk to” is being parsed as a greeting, not the “telling it about” action. You can use the “actions” debugging command to see exactly what action is being processed. Eric Eve’s Conversation Framework defines a couple different kinds-of-action to catch every form of conversation, which he can then handle with some Before rules. You might be able to use the same tactic.

That was the missing clue. Thanks a bundle.

So for anyone having the same problem, this is how you execute an action before or after a conversation:

Before saying hello to Ada Lonstrøm: Deactivate Ada Lonstrøm. After saying goodbye to Ada Lonstrøm: Activate Ada Lonstrøm.

Seems to work fine. :slight_smile:

Thanks all. :wink:

BiB