There’s a car parked in one of my locations. It’s not significant, but it completes the scene nicely. The thing is, I need to add some responses to the player’s attempts at opening it, breaking it, etc. so that it seems real; messages like “That’s not something you can open” obviously contradict the fact that being a car, it has doors.
I have all the synonyms typed in (windows, doors, etc.), and I’ve given the car the following attributes: scenery, static, concealed (as its appearance is already noted in the room description) and, because I see no reason why the player shouldn’t be able to put things on top of it or stand on it, a supporter. It’s not a container, because there’s no way to get it open.
This works:
[code]Before [; attack:
“If you damage the car, a hunt will ensue.
Is that what you want?”;
(Taking advantage of the library reply “That was a rhetorical question.”)
push, pull:
"You might find this surprising, but it’s in ~park.~";
],[/code]
…and so forth. It works great – if the player only uses one noun. But here’s what doesn’t work: Triggering the responses when the player tries to smash the car (this is the same as “attack,” right?), or push/pull it, WITH another object.
For instance, there’s a crowbar elsewhere in the game. If the player tries to “smash the car with the crowbar,” the response is, “I only understood you as far as wanting to smash the car.” It simply doesn’t like “with.” And here’s the really weird one: If the player tries to “push the car with the crowbar” (one has to be prepared for somewhat experimental commands), he gets, “You can’t see that here” – even when the player’s holding the crowbar, and the car’s in the location.
It works okay if the player tries to “unlock” the car with something, and even “open” it with something. But not “attack” or “push/pull.”
I tried this to fix the problem thusly (you might laugh):
Before [; attack:
if (second ~= 0)
"Don’t hit the car with that! Someone needs a ride home
later! Honestly. Some people.";
"If you damage the car, a hunt will ensue.
Is that what you want?";
push, pull:
if (second ~= 0)
"With that little thing? Apparently, you’ve lost your mind.
How disillusioning.";
"You might find this surprising, but it’s in ~park.~";
],
That still doesn’t make the magic Inform fairies understand “with.” I thought that “if (second ~= 0)” would translate to: “if the player’s command has an indirect object.” Is there any way to specify a Before that means “verb WITH noun?”
I tried the DM4, but if the solution’s in there, I can’t find it.
Thanks very much. Again, I appreciate your time.