Look vs examine

For some reason if the player ‘looks’ at Locke’s Hand, it says it is empty. But ‘examining’ works just fine in revealing the key inside. How can I fix this?

Locke's Key is a thing. 
Locke's Key unlocks the dirty door.
After examining Locke's Hand for the first time:
	now Locke's Key is in Locke's Hand.	

LOOK HAND, LOOK AT HAND, and EXAMINE HAND are all the same action. (“Examining”.) They all have the same result.

Are you confusing those with LOOK, as in getting the room description? LOOK by itself won’t trigger the rule you quote, because it’s not an examining action.

1 Like

Quoting myself from the recent thread:

Locke's Key is a thing.
Locke's Key unlocks the dirty door.
Before examining Locke's Hand for the first time:
	now Locke's Key is inside Locke's Hand;

One way to achieve the right result is to use Before, see above, instead of After, because otherwise the key will only be in the hand after looking at it / examining it.

(As zarf said, LOOK AT and EXAMINE are the same for objects, as you can see with your version of the code by first looking at the hand, then examining it; and the other way round [after restarting, of course] – in both cases, in your version, the key first won’t be there and then will be there on the second try.)

1 Like

Well, I don’t understand why ‘before’ works rather than ‘instead’ but it does.

Thank you! That fixes a bunch of other holes in my game that must be on the same principal.

Do you mean “before” rather than “after” as you had in the first post? The answer would be that the after rule worked; you just didn’t hear about it. For commands whose whole point is describing things – like examining, looking, looking under, inventory – the output comes from a Carry Out rule. The Carry Out rule wouldn’t mention the key because it isn’t there yet. If a Before rule puts it there, Carry Out will mention it because it’s there. An alternative would have been something like:

After examining Locke's hand when Locke's Key is nowhere:
  now Locke's Key is in Locke's Hand;
  say "You spot a key inside the hand."
2 Likes