Having to kill somebody

I am a college student brand new to IF. We are required to develop a game for a project, but I need help with writing the text/code.

Our story is about a secret agent in an airport who has to find a “bad guy” placing a couple bombs throughout the airport. My specific part of my group is finding the flight manifest on a computer in a control tower.

I need to set it up so there are three people in the control working at three different computers. One of the computers has the manifest. But to get to the computers, you have to kill the the air traffic control guys. My code so far:

The Control Tower is a room. “After walking up several flights of steps, you are now at the top of the control tower. The tower is surrounded by windows. There are three air traffic control men in the room: John, Alex, and Patrick. You know their names from nameplates on their desks. Each person has a computer in front of them. To the west back down the stairs is the Gate.”
The player carries a knife and a camera.

John is a man in the Control Tower. “John is working to the left of you at a desk.” The description of John is “John is wearing a headset.”
Alex is a man in the Control Tower. “Alex is in the middle working in front of you at a desk.” The description of Alex is “Alex is wearing a headset.”
Patrick is a man in the Control Tower. “Patrick is working to the right of you at a desk.” The description of Patrick is “Patrick is wearing a headset.”

Understand the command “kill” as something new.
Killing it with is an action applying to two things.
Understand “kill [someone] with [something]” as killing it with.
Understand “murder [someone] with [something]” as killing it with.
Understand “stab [someone] with [something]” as killing it with.
After killing John, say “You have murdered John! His computer is now accessible.”.
After killing Alex, say “You have eliminated Alex! Feel free to use his computer.”.
After killing Patrick, say “You have sliced Patrick to shreds! You can now access his computer”.

But in this last part, I encounter a problem. “Problem. You wrote ‘After killing John’ , which seems to introduce a rule taking effect only if the action is ‘killing John’. But that did not make sense as a description of an action. I am unable to place this rule into any rulebook.”

And that problem occurs for each person? Any ideas on how to fix that? I am also having trouble creating three computer objects? How do I make it so you cannot examine the computers without killing people first? If they do try to examine without killing, how do I make it so security comes and takes me to end the game? Help please?!?

Try “After killing John with the knife” instead of just “After killing John”. As defined the action isn’t “Killing John,” it’s “Killing John with [something]”; you may need that “with.”

You’ll also need a rule that gives a sensible response if the player tries to kill John with the camera, and a rule (probably “Carry out killing John with the knife” or something) that removes John from play when you kill him – it would be pretty embarrassing if John was still in the room wearing his headset after you killed him. If you do that, you might want to create a “John’s corpse” object and move it to the room when you kill him. Then you could just have a rule like this:

Instead of examining John's computer while John is visible, say "John isn't going to let you see it."

If you really want to make it so that the game ends when you examine the computers without killing anyone, you could have something like this:

Instead of examining John's computer while John is visible: say "John sees you trying to look at his computer and says, 'Hey! What are you up to!' He calls security to take you away."; end the story saying "You have lost".

But don’t do this. There may be some dispute about whether it’s better to give the player an easily undoable losing ending or to prevent them from doing the action, but you should never make the player lose because you’re interpreting a completely sensible action in an unpredictable way. “Examine computer” usually amounts to “What can I see of the computer from here?” not “Walk right up to the computer and try to use it.” Also, I’m trying to envision a scenario in which security comes and takes you away when you examine the computer but not when you start hacking the air traffic controllers to bits, and I’m not succeeding.

(I can think of one case where killing the player off unpredictably in response to “examine” worked, in “Under, in Erebus”:

If you try to examine the Cyclops, he says “Hey! Keep your hands to yourself!” and kills you. But that works because the game takes place in darkness, so examining something means feeling it (though it’s easy to forget this), and also because it’s funny and the game is full of lots of other cheap deaths.


Another thing you could do is say “A person can be alive or dead. A person is usually alive”, have the carry out killing rule make the controller dead, and change the “Instead of examining” rule accordingly; then you’d want to change the descriptions and initial appearances depending on whether the controller is alive or dead.

How you would create three computer objects depends on what you need to do with them, but if you don’t need any fancy behavior you could just create three objects called “Alex’s computer,” “John’s computer,” and “Patrick’s computer.” The more you want to implement them as things that behave similarly, the more you will want to do something like “A computer is a kind of thing. John’s computer is a computer in the Control Tower,” but if all you need is for them to give you a clue when you examine them it may not matter.

Also, um, it seems not so heroic to murder three innocent air traffic controllers?

Is there a code where I can just tie up the three men instead of killing them?

You can define verbs and actions to do whatever you want. Change the knife to a rope, “kill” to “tie up,” change your prose accordingly, it can work the same way. It wouldn’t be any harder than writing the code to kill them.

Or make it a tranquilizer gun, or have the player distract them with a delicious pie or other shiny object long enough to get a look at the computers – well, this is a collaborative project, there may be a limit as to what you can do. But if you can think of what you want to do, you can probably code it. Especially if it’s just a question of defining and implementing one action.

Killing the player off in response to EXAMINE MEDUSA would also be fair.

Sorry, that’s just a song that popped into my mind. I suppose (correctly?) that your task is more about implementing the idea into working Inform 7 code than about the actual plotting of the story, but really… You’re a secret agent and you need to kill up to three innocent people in air traffic control in order to get a passenger list? Couldn’t you just, you know - flash your badge at the information desk and ask for it?

Well, unless you are Remo Williams.

I suppose your story could be all about this agent questioning his own moral compass, or maybe it turns out he secret organization doesn’t even exist and this is all an elaborate setup, or whatever. But if it’s just a puzzle to get the passenger list, maybe you should just pull out the stun gun instead? And maybe zap all three of them before you start looking at the computers? As Matt said, it doesn’t need to be harder to implement.

Anyway, note that “kill” is already understood by Inform as a synonym for “attack”. Attacking is normally blocked by the “block attacking rule”, but you can either remove that rule or just override it with an “instead of” rule.

"Gratuitous Violence" by Vyznev Xnebara

The Dark Alley is a room. A nasty-looking thug is a man in the alley. "[A thug] stands in front of your, wielding a knife. You're not sure why, but it looks like he's about to kill you." The thug carries a knife. The player carries a gun.

Understand the command "shoot" as "attack".
Understand the command "hit" as something new [or rather, don't understand it at all].

Does the player mean attacking the thug: it is very likely.

Instead of attacking the thug when the player carries a gun:
	say "You shoot the thug.";
	increment the score;
	end the story finally.

Instead of attacking the thug, say "You seem to be unarmed."

Instead of attacking, say "That is probably not the best target for your violent impulses right now."

Every turn: say "The thug stabs you."; end the story saying "You die".

The maximum score is 1.