Hi! I7 project going. I’m trying to get some code working involving “in the presence of” as per the documentation 7.12.
So, here’s a facsimile of my code that I can’t get to work:
every turn while in Tea Party Grove:
if player is holding the tea cup:
if player is in the presence of a person:
say "You should drink some more tea so as not to be rude!";
This doesn’t work, nor does “in the presence of someone”. I get this error:
every turn while in Church:
if player is holding the dildo:
if the player can see someone:
if the person is the player:
say "You should put your dildo away as it is getting you some angry and confused looks.";
This compiles fine but doesn’t work correctly. Now the message won’t display even when near an NPC.
“if the person is the player” doesn’t mean what it looks like it means. It means the same thing as “if a person is the player,” which is always true, so your condition isn’t firing. (In the next edition of Inform “the person” won’t compile.)
You could try “if the player can see someone who is not the player,” though I’m not positive that will compile. If it doesn’t, then you can define NPC as a person who is not the player and use “if the player can see an NPC.”
I also think you probably don’t need any of those "do nothing"s; if you leave them out it’ll still, well, do nothing.