Why can't the player look at things?

Inform 7 doesn’t seem to understand what “look at [something]” or “look at [someone]” mean. Any pointers?
the code.PNG
looking at ppl.PNG

There’s a difference between the command that the player types and the name of the action that that command generates.

In this case, “look at [something]” generates the examining action, so you’ll want to write your rules in terms of examining.

If you go to the Index panel, click on the Actions tab at the top, and then click on the “Cm: commands” box, you can view a list of which commands generate which actions.

Also “The description of the room after looking a second time…” probably won’t work.

[code]Test Room is a room. “Here is the normal description of Test Room.”

Instead of looking in Test Room for the second time:
say “This second description of Test Room supercedes the normal description but only on the second time a LOOK is attempted. Be aware that if the second try at LOOKing is overridden (say if the room is dark) and the player misses this descripton, it will never be shown since there is only one chance possible to look ‘for the second time’.”

After looking in Test Room for the second time:
say “This would be appended to the normal room description, but will not show since we’ve overridden the second LOOK already with the INSTEAD rule above.”

Test Room 2 is south of Test Room. “[one of]Here is the first variation of the description of Test Room 2.[or]Here is the second variation of the description of Test Room 2.[or]Here is the first variation of the description of Test Room 2 (which is a lie since this is actually the third description, but if it is identical to the first, the player will not notice and the text variation stops here.)[stopping].”

Test Object is in Test Room 2. “A test object lies discarded on the floor, this description will persist until Test Object is picked up.” The description is “[one of]Description 1.[or]Description 2.[or]Description 3, this will cycle back to description 1 next.[cycling]”

Test me with “look/look/look/go south/look/look/look/look/x object/take object/x object/drop object/look/x object/g/g/g/g/g”[/code]

Be careful with “after” rules, since by default only one of them will run per turn. (They stop the action unless you say otherwise.)

You can use the “[one of]First time[or]Second time[or]After that[stopping]” or “[first time]First time and [only]every time” constructions to make text change based on whether it’s been shown before.

Also worth pointing out: “after” rules work a bit differently with the examining action, because the text generated by an examining action is generated in the “carry out” rules instead of the “report” rules. (Not sure why… perhaps the rationale is that to carry out an examination and to report on its description are essentially the same thing?)

This means that writing an “after” rule for examining something doesn’t replace the standard description, it just adds to it. If you write this:

A potato is on the table. After examining the potato, say "Hey, nice potato."

you’ll get this:

Thank you for the responses! Sorry, I haven’t been able to work on this for a bit. Trying out your suggestions now…

It works! :smiley: Here’s what I used:
it worked.PNG