Hi.
I’ve been writing an IF using Inform 7 for a class. It’s due tonight and I’ve been having a lot of problems tying everything together.
I’m trying to use [If unvisited][otherwise] to say things only if the player has never been in that room before, but it still displays the first thing every time I visit a room. Here’s an example of how I’m using it:
The Mansion is a region. James’s Room is a room. James’s Room is in the Mansion. James is a man in James’s Room. Instead of examining James: say “You know your friend James, a millionaire’s heir, to be quite the ladies man, despite his appearance. The first woman he ever loved just happened to be the mother of his son, Ashlie, who, though the two broke up, has been living with him to provide a better home for their son. Lately, James has been caught up with Rene, an ex-prostitute he found on a night of loneliness.”. “[If unvisited]You enter James’s room. You see your friend sitting on his bed, obviously upset about something. Maybe you should ASK HIM ABOUT SOMETHING.[otherwise]James is gone. You probably shouldn’t be in here if he’s not”. Understand “him” as James. After asking James about “something”, say “James looks up at you and says, ‘Oh. Hey. It’s Rene… She’s pregnant, but the baby might not be mine. She started working for her pimp again.’ Uh, maybe you should LEAVE James alone right now. The door is that black oak panel that is closed to the west.”
The prompt to ask James something displays every time I enter James’s Room, even though there are no compiler errors.
Twice in my game, I want to move a character from one room to another, but after the action that’s supposed to lead to a character being moved, the character remains in the same room and the player can still interact with him there. Example:
The black oak panel is west of James’s Room and east of the Grand Hallway. The black oak panel is a door. The black oak panel is closed and unlocked. The Grand Hallway is in the Mansion. Ashlie is a woman in the Grand Hallway. Instead of examining Ashlie: say “Ashlie lives with James, the father of her son Harley. She’s very unhappy about the addition of Rene under their roof.”. After going to Grand Hallway: say “[If unvisited]As you leave, James rushes out, darting down the hall. A few moments later you hear the front door slam. Ashlie asks what’s wrong. You jump; you didn’t know she was there. Should you TELL HER ABOUT RENE? Would James mind? Maybe you should TELL HER ABOUT NOTHING.[otherwise]Ah, yes. How very grand is this hallway.”. After going to Grand Hallway: move James to Cafe. Understand “her” as Ashlie. After telling Ashlie about “Rene”, say “Ashlie is shocked. And calls up Erin. Maybe telling Ashlie wasn’t the best idea.”. After telling Ashlie about “nothing”, say “Ashlie shrugs. ‘OK, don’t tell me. Just make sure he doesn’t do anything crazy.’”
James stays in his room, again though there are no compiler errors.
In a part of my fiction, I’ve set up rules for saying yes and no:
“[If unvisited]You stop in the local cafe. As you approach the counter, you see Rose, of all people, has noticed you and is coming your way with a smile. ‘Hey,’ she says, ‘Have you seen Alan? He’s not at work and you always seem to know what he’s up to.’ YES or NO?[otherwise] You approach the cute cashier and order a latte and a scone.”. After saying no, say “She sighs. ‘Fine.’ Maybe he’s not telling anyone anything these days, not just me. I can’t believe I have to ask this when he’s my husband, but do you know what’s been up with him?’ Should you TELL HER ABOUT ALAN?”. After saying yes, say “She almost seems surprised. ‘You do? Home? Oh. That’s odd. But, then again, so many things have been odd lately. Do you know what’s been up with him?’ Should you TELL HER ABOUT ALAN?”. Understand “her” as Rose. After telling Rose about “Alan”, say “‘What?’ Rose is taken aback. ‘I’ve…I’ve got to get out of here.’”. After saying no, say “‘OK. Maybe I just need to ask him directly. I’ll see you later.’”. After going from the Cafe: move Rose to the Chimney House.
This compiles fine, but when I type yes or answer yes, it says “There is no reply” or “That was a rhetorical question.” Why isn’t it adhering to the rule?
I’ve been trying to work out the endings of my game, but I can’t figure out the syntax to do it. Throughout the game, the player has been learning secrets from characters and been given opportunities to share those secrets. I want to base my possible endings on whether or not the player shared secrets. The ends I want are:
If the player told Rose about “Alan”: end the game by saying “Rose ended up leaving Alan after you told her about his dealings with the mob. Word got around and Erin pursued full custody of the twins. With nothing good to live for, Alan’s life became completely absorbed by the mob. I bet you’re feeling pretty good right now, huh?”
If the player told Jane about “Marie”: end the game by saying “You get a text from a friend telling you to go to the nearest TV and turn on the local news. Marie is getting arrested! Man… What a shame!”
If the player told Rose about “Alan” and told Jane about “Marie”: end the game by saying “In the next few weeks, you see how you changed a few lives dramatically. You get a text from a friend telling you to go to the nearest TV and turn on the local news. Marie is getting arrested! Man… What a shame! Rose ended up leaving Alan after you told her about his dealings with the mob. Word got around and Erin pursued full custody of the twins. With nothing good to live for, Alan’s life became completely absorbed by the mob. I bet you’re feeling pretty good right now, huh?”
Otherwise: end the game by saying “Well! What a day! You dodged some bullets and any slip ups didn’t lead to anything that wouldn’t have happened otherwise. Phew… Tomorrow, you’re staying in.”
Also, I want don’t want the endings to occur until the player has reached Your House, a room in the game. So, do I say something like: If the player is in Your House and
Thanks for any help.