Instead of talking to... when location is... not working

I am trying to use the command:

Instead of talking to Dave when location is woodshed:
        Say "Not now Dave". 

I receive the following error:

Problem. You wrote 'Instead of talking to Dave when location is woodshed'  , which seems to introduce a rule taking effect only 'when location is woodshed'. But this condition did not make sense, so I am unable to accept this rule.

I have tried the following (it is working):

Instead of talking to Dave:
	if Dave is in the woodshed:
		say "Hello David".

But will it have the same outcome as the command Instead of talking to Dave when location is woodshed ?

I would rather want to use the ...when location is...

It seems like the part that say Instead of talking to Dave:... is were the problems is as I have removed the first example and the second example and only type in the command:

Instead of talking to Day:
        say "Hello Dave".

Then I get the same error as above.

I checked my extensions and it seems like the extension Speechless by Zed Lopez is causing the problem.

It would be nice to know why it is causing the error and how to avoid it when still using this extension.

Is it perhaps all in the name: “Speechless”?

Well, it is the express intent of Speechless to both stop the player from talking and stop the game from giving messages that presuppose the player can talk.

But neither Standard Inform nor Speechless have an action name beginning talking to, so how did you define that action? (It might conflict with “talking” the named action pattern in Speechless.)

2 Likes

Thanks.

Not sure what you mean by But neither Standard Inform nor Speechless have an action name beginning talking to, as I used the following command:

Instead of talking to Dave:
       say "Hello Dave".

without the extension Speechless by Zed Lopez and it worked 100%.

I am not saying there is anything wrong with your extension as there aren’t but I wanted to know how I can use it with the standard set of talking rules.

I haven’t used this extension, but from a quick look the whole point of it is to disable all the standard actions involving speech so from a design perspective this seems like an odd goal - is the idea that you’re changing the extension’s error messages to tell the player that interaction with other characters is done via a custom TALK command?

Anyway the technical issue is probably, as Zed indicated, that you defined a “talking” action that’s conflicting with the “talking” kind of action defined by the extension. So you’ll likely need to rename one or the other of them - I suspect it’s easier to change the extension one, since it seems like you shouldn’t need to directly refer to its use of “talking” in game code.

EDIT: as to your original question, “when the location is the wood shed” fires when the player is in the wood shed, while “when Dave is in the wood shed” does so when Dave is (“the location”, by itself, always means the player’s location). So they are different, though if the talking action can only take place when the player and Dave are in the same room it might not matter.

1 Like

Thanks for the explanation.

Will give it a go and see how I can get it to work.

Somewhere in your code there must be a talking to action defined, or that wouldn’t compile. Something like this:

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

If there isn’t, the Inform compiler will say:

Problem. You wrote ‘Instead of talking to Dave’ which seems to introduce a rule taking effect only ‘talking to Dave’. But this does not look like an action, since there is no sign of a participle ending ‘-ing’ (as in ‘taking the brick’, say) - which makes me think I have badly misunderstood what you intended.

See the manual: 7.1 > 7.1. Actions

Is the talking to action defined in another of your included extensions?

2 Likes