I’m almost finished with my game. Actually, I am finished, at this point I’m just adding small things to make it seem like a real world, like my question pertains to…
In my game, there are flammable objects and a fireplace. I’d like these things to burn without a problem only in the fireplace. If they burn the items outside of the fireplace, they burn the house down and the game ends prematurely. For example, burn the encyclopedia outside the fireplace, the fire becomes uncontrollable: end the story. Burn the encyclopedia in the fireplace, it turns to ash and continue play.
Also, how can you make things in multiple rooms? For example, you’re in the parlor, and you type the command BURN HOUSE, it burns the house down. Also, the same would happen in kitchen: BURN HOUSE.
Could someone direct me to the right “code” for these kinds of action?
Hopeful these are my last questions. I try not to post – only when I get stuck and frustrated do I turn to you guys, and you guys have been great. Thanks.
Well, burning is already an action in the standard rules, so you have to take out the “Block burning rule”:
The block burning rule is not listed in any rulebook.
and then you can write action rules for burning as discussed in chapters 7 and §12.9 of Writing with Inform (plus maybe some more of chapter 12):
[code]Before burning when the player does not carry the lighter: say “You don’t have anything to start a fire with.” instead.
Instead of burning something when the noun is not in the fireplace:
say “The fire quickly spreads from [the noun] to the rest of the house and burns it down, with you in it.”;
end the story saying “You have been frizzled to a fritter”.
Carry out burning: now the noun is nowhere.
Report burning: say “[The noun] burns to ashes and crumbles into the fireplace.”[/code]
(Subtlety: It’s a “Before” rule rather than a “check burning” rule because the “before” rules run before the “instead” rules, and the “check” rules don’t.)
Also, be warned that this may annoy your players. You may also want to make a burning it with action to allow the command “Burn encyclopedia with lighter”; see chapter 12.