Implementing cutting with an object

Why does this not work?

Understand "cut [something] with [something]" as cutting it with.
After cutting the tripwire with glass shards:

The error message is:

You wrote ‘Understand “cut [something] with [something]” as cutting it with’ : but ‘understand … as …’ should be followed by a meaning, which might be an action (e.g., ‘understand “take [something]” as taking’), a thing (‘understand “stove” as the oven’) or more generally a value (‘understand “huitante” as 80’), or a named token for use in further grammar (‘understand “near [something]” as “[location phrase]”’). Also, the meaning needs to be precise, so ‘understand “x” as a number’ is not allowed - it does not say which number.

So the way I interpret it is, I should specify it’s an action applying to two things. But when I try to do that, it tells me that Inform already understands cutting.

1 Like

Yeah, CUT [something] is in the Standard Rules. The Paddington example might get you where you want to go, though!

1 Like

Cutting is an existing built-in action. Look to the References section of the I7 Docs and Resources post and you’ll see a link to the Standard Rules Actions reference which includes lists of all the built-in actions and commands.

2 Likes

But this is weird, right? Since it should be already in the rule book? Deleting the code and going straight to the after rule doesn’t help either.

In the sentence ‘Understand “cutting [something] with [something]”’ , I can’t find a verb that I know how to deal with.

I think I’m following the Paddington example here.

Understand "cutting [something] with [something]". Cutting it with is an action applying to two things.

Oh! Forgot to add cutting it with to the first sentence! Let’s see how it works

1 Like

cut wire with shards
I only understood you as far as wanting to cut the tripwire.

Your code has understand ”cutting something…”

1 Like

It tells you to do that in the example Mike cited, though! :sob:

I’ll try to remove it.

Same problem.

What’s your full cutting it with code?

1 Like

I think the Understand statement just uses “cut”, since that’s what the player is likely to type. This minimal action specification pulled from the example seems to work:

Understand "cut [something] with [something]" as cutting it with.

Cutting it with is an action applying to two things.
1 Like
Understand "cutting [something] with [something]" as cutting it with. Cutting it with is an action applying to two things.

Oh. Of course. Silly me. Works now, thanks!

I swear, the blindness you get when wrestling with something for a bit is going to be the end of me.

2 Likes