Trapped in a Sack [Problem Solved]

Hello, amateur IF writer here, having trouble imagining a solution for a simple problem.

You see, there are a lot of things my player is capable of doing, but for one scene of my story,
the player is disabled and trapped in a sack. I’d like to make a very complex response that happens each time the player “struggles”,

And I’d like the game to understand a whole slew of things as struggling (including a few custom actions), but only for that scene.

I know I could do something like:

instead of kicking while Stuck in the Sack is happening:

-but the response is going to be quite complex, so having this chunk of code repeated for every action seems like the wrong way of doing it.

You haven’t quite given enough information to suggest a strategy, but one thing that might help is a “struggling” kind-of-action:

[code]Kicking is struggling. Untying the rope is struggling. Jumping is struggling. Attacking something enclosed by the player is struggling… etc.

Instead of struggling when the player is in the sack:
something complicated.[/code]

Remember also that you can use “during” to make a scene-happening condition more concise. I think it has to come at the very end of the rule preamble.

Also, if you’re saying something detailed that has a lot of chunks that get re-used, you can break them up into separate “to say” phrases. And remember, “to say” phrases can have side effects!

Depending on what you want to happen, activities might also help:

[code]Escaping using something is an activity on objects.

Instead of struggling when the player is in the sack:
Carry out the escaping using activity with the noun.[/code]

Thank you very much for helping me with this problem. It seems obvious now that I know what the solution is.
Hopefully as I keep working on these projects I’ll start developing a better inform vocabulary.

Quick question though:

What is the difference between using “is happening” and “during”? I want my code to be as concise as possible, and develop good practices, so any information would be appreciated. Just earlier today I looked at the source text behind one of Emily Short’s fictions, and it was spectacularly clean. I aspire to do something like that myself some day.

As far as I know, there’s no difference.

I believe the meaning is identical, but the places where you can use “during” are more limited. I think it can only appear in rule preambles, and if I’m not mistaken, it can only appear at the end, after the “when” clause if there is one.

If I am mistaken, I hope someone will correct me! :stuck_out_tongue: