I want the player to be able to detach/untie two objects (after earlier attaching them to each other).
The tie/attach part is easy, it’s built in, but how about the opposite?
I have looked at the ‘Otranto’ section in the documentation but that seems like overkill for what I need.
You can check what’s built-in by using the ACTIONS testing command.
Actions listing on.
(to the table)
[tying the rock to the table]
You would achieve nothing by this.
[tying the rock to the table - failed the block tying rule]
That’s not a verb I recognise.
So Inform doesn’t have a built-in verb for “untie”. You’ll have to define your own. If you want to untie only a single object:
Untying is an action applying to one thing.
Understand "untie [something]" as untying.
Check untying (this is the block untying rule): say "There's nothing to be achieved by that." instead.
If you want to specify two objects, just like with tying:
Untying it from is an action applying to two things.
Understand "untie [something] from [something]" as untying.
Check untying something from something (this is the block untying rule): say "There's nothing to be achieved by that." instead.
Now you can write “instead of untying” rules, just like you can write “instead of tying” currently.
Perfect thanks, I can do that, just wanted to know I wasn’t missing something obvious.