How to push something with something

Good morning everyone.

I have a small pin that needs to be pushed with a straightened paperclip.

I can make it so that if someone just writes push pin and has the straightened paperclip everything goes as it should.

I’m trying to figure out the fastest way to not punish a player who, understandably, writes “Push pin with paperclip”.

Ordinarily I’d write a rule about “pushing it with” but as pushing is a core action, and I use it elsewhere, and this is a tiny puzzle, I don’t want to mess with it if there is a fast alternative.

I wonder is there something like:

every turn when the player is in the hideout and the player encloses the paperclip and the paperclip is straightened and the input is "push pin with paperclip":
        say "You push the pin free releasing the whip.";
        now the player encloses the whip.

You could write a rule like so:

Instead of pushing the pin when the paperclip is enclosed by the player:
    try pushing the pin with the paperclip.

I am assuming that you have an action in your game called Pushing it with, as you mentioned. The rule above should work perfectly.

By the way, the concept ‘enclose’ includes carrying and wearing, thus is appropriate for an ‘if’ clause–in a ‘now’ clause, you’ll need to be more specific–

...
now the whip is carried by the player;
...

But then this is neither here nor there. You could use an Every turn rule for this, but this would make the action automatic, and your players might want to have a little more agency, especially if the action is a solution to a puzzle.

I hope that this helps.

1 Like
Manipulating it with is an action applying to two things.
Understand "push [something] with [something preferably held]" as pushing it with.
Understand "poke [something] with [something preferably held]" as pushing it with.

Now you have a “manipulating it with” action that catches PUSH THINGY WITH WHATEVER, and you can write rules about it.

2 Likes

I want to add something to my answer above–you might want to say it more like this–

Instead of pushing the pin when the player can see the paperclip and the paperclip is enclosed by the player:
    try pushing the pin with the paperclip.

The reason for this is that if the paperclip is enclosed by the player, it might be inside something (like a duffel bag) which is zipped up closed–in this case the player has it, but cannot see it, so when the ‘pushing the pin with the paperclip’ action is tried, it is defeated at the gate, because you’ll get something like ‘You can’t see that here.’–which would be confusing to the player, who in fact, CAN see the pin (but not the paperclip, which is not even mentioned in the text thus far). So, if you say ‘when the player can see the paperclip…’ then Inform will allow the action to go through its paces (like having the player take the paperclip if this is necessary, because the player can see the paperclip, and then push the pin with it). Also, be sure to include in the text of the result a phrase mentioning the player taking the paperclip and using it. Something like ‘Seeing how tiny the pin is, and noticing that you have a straightened paperclip, you take the paperclip and push the pin with it.’

I hope that this helps!

1 Like

Thanks again Daniel.

Have I understood this correctly?

It seems to work but I made a change that was, maybe not the right thing to do, big-picture-wise.

Manipulating it with is an action applying to two things.

Understand "push [something] with [something preferably held]" as manipulating it with.

Understand "poke [something] with [something preferably held]" as manipulating it with.

instead of manipulating pins with the paperclip when the paperclip is straightened:
	say "pushed".

Yep, you’ll just also want some sort of rule to deal with PUSH ME WITH SPOON or anything else that’s not the intended solution.

Check manipulating something with something:
    try pushing the noun instead.

Now if your Instead rules don’t intervene, you’ll get the normal response from PUSH ME.

1 Like