Hi, so, I’m learning to use Inform 7 and I’m sorry if my question sounds very stupid, but I don’t exactly know or understand what the media can and cannot do yet.
So, the thing I wanted to try is to have a character react to being looked at. So I tried to enter “after looking at xxxx, xxxx is in xxx room”. However, Inform 7 told me that it didn’t recognize looking at as an action, and I was wondering why is that, and if there was a way to make it possible by using another variable. Thanks in advance!
You can work out what action Inform turns your command into by typing
If your game is:
The Kitchen is a room.
Tom is a person in the Kitchen.
Then you would see:
You can see Tom here.
Actions listing on.
>look at tom
You see nothing special about Tom.
[examining Tom - succeeded]
So “look at Tom” is treated the same as “examine Tom”.
That doesn’t solve your underlying problem, probably, but I hope it sends you in the right direction.
P.S. if you to go the Index tab (on Windows anyway), then A2 (Alphabetical) of the Actions Index you’ll find:
"look at [something]" - Examining
Welcome! I’m learning, too, so I feel your pain.
Would something like this work for you?
Palace is a room.
Jim is a man in the Palace.
Instead of examining Jim:
say "You glare at Jim, and he glares back.".
Welcome! As others have said, there’s lots of folks on the boards ready to help figure out how Inform 7 works, and speaking at least for myself that’s a process that involved lots of questions, so definitely don’t feel shy about asking them!
Jonathan and Amanda have laid out how to ID what action Inform is using here, and how to write rules about it, but from your post it seems like you might want to have the character move around once the player examines them? If so, here’s some code that might work for that:
Test chamber is a room. Jim is a man in the test chamber. The description of Jim is "As good looking as ever."
After examining Jim:
Let P be a random room which is adjacent to the location;
Say "Jim wilts under your scrutiny and scurries away to the [best route from the location to P].";
Move Jim to P.
The lab is north of the test chamber. The closet is east of the lab. The atrium is south of the closet. The test chamber is west of the atrium. The hallway is south of the test chamber. The office is east of the hallway. The office is south of the atrium. The storeroom is west of the test chamber. The kiosk is north of the storeroom. The kiosk is west of the lab. The cafeteria is south of the storeroom. The cafeteria is west of the hallway.
I built a little 3x3 map so you can see how it works. This is adapted from an example in the Recipe Book called Mistress of Animals – you can check it, and the associated documentation, out if you’re looking for more info on how it works!
Thanks! I changed and went in this direction:
after examining Emmy Gabrielson:
if EmmyMove is false:
now Emmy Gabrielson is in Producer Room;
now EmmyMove is true;
continue the action;
It’s a bit wordier than the others options I get for the other, which btw, thank you as well!
Shoutout to Mike Russo, I will definitely do that in the future! Thanks a lot !
Inform 7 allows lots of flexibility.
After examining Emmy Gabrielson when the noun is not in Producer Room: now the noun is in Producer room.
After examining Emmy Gabrielson when the noun is not in Producer Room: now the noun is in Producer room; say "Emily heads toward the Producer Room.".