Unlocking Issue: Handcuffs?

I’ve been working through this all night, trying to make it work. I’ve mostly got it, but am pretty irritated that it has been so difficult.

The player is manacled to a bed, one wrist on one end, the headboard on the other. At some point, he figures out how to unlock the headboard side while the other side jams. Basically, I want the player to be stuck wearing half the manacle with the other side dangling (to be used later). But I’m just covering bases, so I don’t want it to be lockable or unlockable anymore. More to the point, I want it to saw what I want it to say.

[code]Instead of unlocking the manacles with the bedspring: say “You unlock the manacle blah blah blah…”; now the player is not manacled; move the player to the bunk house; now the player is wearing the manacles.

Rule for supplying a missing second noun while unlocking:
if the bedspring is carried, now the second noun is the bedspring;
otherwise say “You will have to specify what to unlock [the noun] with.”

Instead of locking the manacles with the bedspring when the player is wearing the manacles, say “There is no reason to do that.”

Instead of unlocking the manacles with the bedspring when the player is wearing the manacles: say “The mechanism is jammed. It would be of no use.”[/code]

I can get it to work if I want to unlock with the bedspring. But I just want to say

Instead of locking or unlocking the manacles when the player is wearing the manacles, say "There is no reason to do that."

But I get:

What is the problem with “Instead of unlocking” by itself?

It’s always some little thing that makes me crazy… :smiley:

Thanks!

M

P.S. “Rule for supplying a missing second noun while unlocking:” Seemed like a reasonable solution, but changed nothing that I could tell.

Inform understands ‘instead of locking’, but it doesn’t understand ‘instead of locking the manacles’.

The full name of the action in question is ‘locking it with’ (where ‘it’ is really just a placeholder for the noun, and where a second noun would follow after the word ‘with’). When you write rules for the action, however, you need to replace the ‘it’ either with the name of a specific object (like ‘the manacles’) or with a general description (like ‘a lockable container’ or just ‘something’). So the most general instead rules for locking would start:

Instead of locking something with something: [do this and that] Now, Inform understands the mere word ’locking’ as an abbreviation of ’locking something with something’, so, you can equally write just:

Instead of locking: [do this and that] ¡However!, once you specify a noun for an action, you can’t abbreviate the name of the action any longer; you need to write it out in full.

That is, you can’t write just ‘instead of locking the manacles’ but need to write ‘instead of locking the manacles with something’ (or, if you prefer, you can leave out that last ‘something’: ‘instead of locking the manacles with’).

So this should work: Instead of locking or unlocking the manacles with something while the player is wearing the manacles, say "There is no reason to do that." or just: Instead of locking or unlocking the manacles with when the player is wearing the manacles, say "There is no reason to do that."

This, of course, is one of the cases where the fact that Inform 7 up to a certain point is ordinary English makes it hard to guess what goes wrong when suddenly it doesn’t accept what would work just fine in real, natural English.

Ah. Ok.

I think the “something” will fix it for me. I tend to forget those variables.

Thanks so much Felix. :sunglasses:

Mancko

One last thing:

When I say “unlock manacles” it gives me “That’s unlocked at the moment.” Which it isn’t, but in order to use the “unlock” verb I have to set the manacles as unlockable when there are actually two parts, so one side can be locked when the other is unlocked. None of this matters, it’s not going to come up, I just want to be able to gently push the player away from trying to remove them by saying the lock is jammed.

So I don’t want it to say it’s unlocked when it isn’t. Or it’s both. You know what I mean. I want it to say, “The mechanism is jammed.” whenever the player tries to unlock it or lock it in any way. Anything other than “That’s unlocked at the moment.” which is very much out of the flavor of text I’m writing.

If I say “Unlock manacle with bedspring” or unlock with something, I get the right response. But just unlocking the manacles gives the default response, which has been the whole problem.

My feeling is that a player, when the manacles are still on and they feel they have a working key will try to remove them. But instead of typing “unlock manacles with bedspring” might try “unlock manacles” assuming it will work and then get the incongruous message. This is a beginning puzzle so I’m trying to make it as seamless as possible so as not to toss the player out of the narrative so early.

Does that make sense?

M

Here’s a guess. Perhaps you didn’t define the grammar line Understand "unlock [something]" as unlocking it with. ?
The supplying a missing second noun activity won’t run at all, unless you did so.

Consider this.

[code]“Test”

Rule for supplying a missing noun while locking:
now the noun is the standard door;
say “([the noun])[command clarification break]”.

Rule for supplying a missing noun while unlocking:
now the noun is the standard door;
say “([the noun])[command clarification break]”.

Rule for supplying a missing second noun while locking:
now the second noun is the key;
say “(with [the second noun])[command clarification break]”.

Rule for supplying a missing second noun while unlocking:
now the second noun is the key;
say “(with [the second noun])[command clarification break]”.

Understand “Lock” and “Lock [something]” as locking it with.

Understand “Unlock” and “Unlock [something]” as unlocking it with.

The Testing Room is A Room. A key is in the testing room. The key unlocks the standard door.

The standard door is a locked door. The Standard Door is south of The Testing Room. The Other Room is south of The Standard Door.

Test me with “unlock / lock / unlock door / lock door / unlock door with key / lock door with key / unlock door with key / s”.[/code]

Here, there are rules for supplying both the noun and the second noun. However, it won’t work without the “understand” lines defining the corresponding vocabulary.

Hope this helps.