Now, I have this tricky problem I can’t seem to solve. As usual, I may be missing something stupid. Be soft on me: it’s summer vacations…
I have this DEVICE (I need it to be switched off/on) which I want to talk with. The device is out of play for several reasons. I made a rule for its scope:
[code]After deciding the scope of the player:
if DEVICE is switched on:
place DEVICE in scope.
Talking to is an action applying to one thing. Understand “talk to [something]” as talking to.
Check talking to: if the noun is not a person, say “You can’t really expect [the noun] to answer.” instead.
Carry out talking to: say “[The noun] has nothing to share with you, at the moment.”
Instead of talking to the player, say “You mumble to yourself a bit, providing only obvious answers.”[/code]
I can examine it, but I can’t seem to be able to TALK to it, even when it’s in scope.
The game doesn’t say “You can’t see any such thing”, but gives a “that isn’t available”, instead. Which means the thing is in scope but can’t be talked to. I’m guessing being in scope isn’t enough. What now?
Help please
NB: The device isn’t called “device”. I’m hiding the name for spoiler’s sake.
Mmmm… I tried it with an NPC and it seems that, scope or not scope, the PC tries and reach into the room where the NPC is, failing if the room is not in scope. My DEVICE is out of play, so never reachable.
This means i have to remake it so that the DEVICE is… everywhere.
[code]A backdrop can be switched off or switched on.
DEVICE is a backdrop. It is switched off. It is everywhere. [/code]
As only backdrops can be “everywhere”, I just added them the ability to be switched off/on.
Now I hope this won’t disrupt all the other regular backdrops actions
I still have to fix how to make a backdrop a something one can talk to.
I have to get what verb is “DEVICE, hello.” or “DEVICE, I am Captain America”.
Thx for the fast answer, maga and mattw!
NB: the above works because i DON’T NEED the player to be able to “switch device on/off” but just have a backdrop with changeable state. It could have been “a backdrop can be Uno or Trino. A backdrop is usually Trino.”
I’m not sure I would make it a backdrop, unless you also want the player to be able to examine it, listen to it, taste it, &c. Fixing your action definition might be a safer plan. If you change the action to apply to one visible thing, AND you are very careful always to place the DEVICE in scope (when it should be), then I think the understand line can still refer to “[something]” rather than “[any thing]”. This is important because understanding “[any thing]” is incredibly slow and to be avoided whenever possible.
To answer your specific question, I’m pretty sure “DEVICE, hello” eventually becomes the telling it about action, after Inform decides it isn’t a persuasion attempt.
If you’re going to go with the backdrop idea, I don’t think you need to say “a backdrop can be switched on or switched off”; “DEVICE can be switched on or switched off” will do, won’t it?
It’s defined in “Definitions.i6t” with a note reading “Not currently used by I7, but retained for possible future use.”.
It shows itself in “Parser Letter C” of “Parser.i6t” (the bit that deals with NPC persuasion commands, such as “Clark, photograph me”) so that you can say something to a talkable item. This is the note given.
Finally, it shows itself in “CreatureTest”, which tests to see if an item can come under the tokens: ‘’[someone]‘’, ‘’[somebody]‘’, ‘’[anyone]‘’ and ‘’[anybody]‘’.
It also appears that the action has to be either "answering it that, “telling it about”, “asking it about” or “asking it for” in order for the talkable item to be considered under the aforementioned tokens. You may need to add the “talking to” action to that list.
Standard Rules use the former syntax half a dozen times or so. The main difference between them, I suppose, is that the latter lets you test for talkability in I7 code (‘if the noun is talkable’, ‘when doing something to a talkable thing’, etc.); so, if one suspects that one may want to do that, one should definitely use the latter syntax.