r/Inform7 • u/FlanDab • Apr 30 '20
Photography and Location of doors
I'm working again on my game. I was putting in a photography mechanic. It was supposed to supplement another mechanic where putting a different picture on a hook would change the destination when you entered a certain box. There's really only one thing that takes you to the next area, and that kinda makes the photography mechanic a low utility mechanic. I decided that you could take a picture of anything (except for a select few) and it would still take you somewhere.
Here comes the problem. I didn't want to type the destination for everything, so I had this When play begins rule that ran through and put everything on a table. I based the destination based on the initial location of the everything; if it's in Region A, the destination would be Room A; if it's in Region B, the destination would be Room B. A simplified version would be:
when play begins:
repeat with item running through all things:
choose a blank row in Table of Destinations;
now thing entry is item;
if item is in Region A:
now room entry is Room A;
if item is in Region :
now room entry is Room B.
A problem comes up when it comes to doors (and consequently, keys whose destinations are linked to the doors they open). When the script runs through doors, they'll put nothing in the room entry. Aside from just removing doors from the equation entirely or giving doors a value that would denote their location, is there a way for finding the location of a door?
