Inform continues to baffle me. “Take” is supposed to be one of the actions it understands.
So, uhm, like … it’s not doing it for me.
Instead of taking key:
if player is in Mustang:
say "[if purse is open]You start of the engine. Finally you arrive at the police station. You get out of the car."
now player is in Parking Lot;
say "It's inside the purse.";
stop the action.
Is the key in the purse to begin with?
The way you’ve written this, the player can NEVER take the key. Is that what you wanted?
The instead rule you’ve written will always run in response to ‘take key’ (assuming the key is in scope – if the purse is an openable closed container, the key won’t be in scope). If the player is not in the Mustang, nothing will happen, other than the printing of your message.
Sorry, my mistake.
The instead rule never runs, because the story refuses to compile.
I get this message:
Problem. You wrote ‘Instead of taking key’ , which seems to introduce a rule taking effect only if the action is ‘taking key’. But that did not make sense as a description of an action. I am unable to place this rule into any rulebook.
See the manual: 7.1 > 7.1. Actions
See, it doesn’t seem to understand “take.”
Don’t you need an extra semicolon after “You get out of the car.” ?
Yes, but that’s not what Inform is objecting to.
Do you have an object named “key”? Because that’s the error it gives if you try to write an “instead of taking ___” rule with a nonexistent object.
How many keys do you have in the game?
[code]Some keys is a thing. It is inside the purse.
Understand “key” as keys.[/code]
There is only one object called “key” or “keys.”
It works if you use “keys” instead of “key” and fix the semicolon issue. I dunno about the Understand not working, though.
Just did a little test, and its the instead rule Inform 7 is objecting to, not the taking action. Sorry, folks, and thanks for the replies. I LOVE YOU, MAN!
Here’s the deal:
An Understand rule applies ONLY to what the player can type – NOT to what you can type as the author. As far as you or the compiler are concerned, the object is called “keys”. You can’t call it “key”.