NPC says something after 1st encounter after variable change

OK. So the player is going to go do something that makes a noise, and once that noise is permeating the whole game map (got that part), people who weren’t persuadable before become persuadable (got that part). But I want it to be clear that that’s why they’ve become persuadable.

In other words

So I need some sort of code like

After talking to mom for the first time after the doodad is humming say "Mom now hears the loud noise and is anxious to follow you to see what it's all about."

Which wasn’t quite right, of course. Advice appreciated.

[code]The doodad can be humming or quiet. [With either-or properties, the doodad will automatically start at the second value (in this case “quiet”) unless you specify otherwise.]

Before asking Mom to try doing something while the doodad is humming for the first time:
“Now that your Mom has heard the doodad humming, she is much more inclined to do what you ask.”[/code]

This adds the text before checking to see if Mom will actually do it. So you might want to replace “try doing something” with “try [some specific action]” if there’s only a limited number of things Mom will actually do.

My game isn’t dialog-centric, but there are a couple of situations in which you need to talk to people, mostly to get exposition out of them (and for a couple of other things).

In many of these situations, I don’t want the player to have to choose the exact right words (like, “Mom, I found a fruit tree”) but just to simply talk to the NPC after the right confluence of circumstances.

Is there a way I can get

And any other conversation-related commands I might be forgetting to all prompt the same response after the right mix of circumstances? I assume I need to program a number of them each separately, but I while I was able to successfully program “After asking mom about:”, it doesn’t fire after each of these situations and I wasn’t able to find the code that does. “After telling mom about:” and “After saying to mom:” didn’t work.

Thanks!

Mom, take fruit is asking someone to try doing something, since “take fruit” is a properly formed command.

Mom, I found a fruit tree, Mom, slkjdsf, and Say hi are all handled by the awkwardly named “answering it that” action. Since “I found a fruit tree” and “slkjdsf” are not valid commands, they get converted to the equivalent of “say _____ to Mom.”

Tell mom about fruit and Tell mom about sdfllkjsdf are both handled by the “telling it about” action.

Ask Mom about fruit and Ask Mom about slfjsad are handled by the “asking it about” action.

“After telling mom about something” should work for tell mom about ________. “After answering mom that something” should work for say _____ to mom or Mom, whatever.

Thanks Michael, I will try those. Looks like I just didn’t have the exact wording right for telling and answering.

This was too complicated, I guess, or maybe something else is wrong with my syntax?

This didn’t work, which makes perfect sense, since the compiler doesn’t know what “something”:

[code]Before asking Mom to try doing something while the military plane is humming for the first time:
say “Your mom hears the plane’s engine running and is anxious to find out what it’s all about.”

Before telling mom about something while the military plane is humming for the first time:
Try asking Mom to try doing something instead.[/code]

But if I repeat the “say” for all three items, I’m afraid it will say it after you ask mom, after you tell mom, and after you answer mom, when I want it to be said only once after any sort of conversation.

Hm, I just had a thought. Maybe I could do:

[code]Before telling mom about whateveh while the military plane is humming for the first time:
say “Your mom hears the plane’s engine running and is anxious to find out what it’s all about.”

Instead of telling mom about something while the military plane is humming for the first time:
try telling mom about whateveh instead. [seems potentially buggy]

Instead of answering mom that something while the military plane is humming for the first time:
try telling mom about whateveh instead.

Instead of asking mom about something while the military plane is humming for the first time:
try telling mom about whateveh instead.[/code]

Sorry for the thinking out loud here, but my game has gotten hard to test due to the complexity.

Is the latter the way to go, or is it overkill due to some syntax error in the first snippet (which seems better written)?

Yeah, you’ll have to break that up into separate rules.

Ah, okay, I see. Best way to get around this is to define a say phrase:

Before asking Mom to try doing something while the military plane is humming for the first time:
     say "[mom hears humming]";

Before asking Mom about something while the military plane is humming for the first time:
     say "[mom hears humming]";

Before telling Mom about something while the military plane is humming for the first time:
     say "[mom hears humming]";

To say mom hears humming:
     say "[one of]Your mom hears the plane's engine running and is anxious to find out what it's all about.[or][stopping]";

Any time you try to talk to your mom via any means, the game goes to the “mom hears humming” routine. The one of…or…stopping construction causes the routine to print your message the first time it’s fired, and then nothing all subsequent times.

Michael: Very cool, thanks so much!