INFORM 7: Issues i have not resolved...

I have many but here are some that i cant seem to get my arms around, any help would be nice :slight_smile:

How do i make it so the players “it” value is set to what i want it to be?
for example the player says open box and inside the box is a letter. i now want to make it so if the player types “GET IT”, it will refer to the letter NOT the box?

How do i make it so if only one item is being carried the GET ALL command doesnt try and re-pick up that item?

How do i make it so if i do a GET ALL it does not include any items that are inside of containers?
ie i pick up a vase that has water in it i dont want it to also take the water.
OR i GET ALL and there is a drawer that is open i dont want it to take the robe that is inside because i cant take the drawer? stopping the drawer pickup i can do however…
i do however still want GET ALL FROM either the vase or the drawer to work properly…

Thanks!

I guess you could make an indexed text ‘it’ property (i.e., variable). I noticed you posted on RAIF as well so I’m hoping some I7 gurus will answer there. However this also works;

"Letter"

The Apartment is a room. A container called a box is here. It is closed and openable. A letter is in the box. 

Carry out taking rule: 
if the player's command matches the text "get it" begin;
if the noun is a container (called holder) and open begin; 
if one thing (called item) is in the holder begin;
now the item is carried by the player;
now the holder is in the location;
end if;
end if;
end if.

test me with "open box / get it / look / i"

I used a nested if in the taking rule because I couldn’t put all the conditions into one if – I guess you could remove the second if condition and make it so the player took all the things from the container (if there are multiples) but that doesn’t seem as sensical.

One thing that helps for this sort of stuff is to look at the Index tab in the IDE after you hit ‘Go’ to compile your game. Then under the Index tab check out actions, and it will list many of the rules that fire when the player tries an action.

I don’t know the solution for your other questions – working on it :slight_smile:.

I’m always in the same boat, I hope this helped.

edit: added a crucial condition to the nested if which I forgot – to make sure the player is typing ‘get it’ and not ‘get box’!

edit again: I notice the question has been answered on RAIF – much more succinctly, too.

groups.google.com/group/rec.arts … 674bbe2dd2

Thanks so much George. Little by little i master this new strange language :stuck_out_tongue:

It’s just personal preferences, but I’m quite happy with IT being a pronoun only the player influences. Maybe it’s because I used to rattle off a chain of commands that I knew would work, long before these newfangled GUIs made everything with a macro-driven point-n-grunt interface.

How do i make it so the players “it” value is set to what i want it to be?

I wrote the extension “Pronouns” to deal with that problem; it’s at the official Inform 7 site for download. That problem took me forever to figure out how to solve, and I figured if it stumped me for awhile it would probably stump others.

As for ALL, I think there’s an Activity for it.

-R