I’ve had to put my full-size project on hold due to unresolved health issues, but on my good days I love to tinker with Inform7 on a much smaller scale. Therefore I’ve started this thread to ask questions about things I occasionally get stuck on.
Although my first question is merely asking for confirmation. About creating scenes in Inform7… am I correct in my belief that to initiate any scene you need either:
a) a time mark,
b) a yes/no state, or
c) the ending of a prior scene?
That’s what I found in the manual: Eg: “when the player is in the Station for the third turn” and “when score is not the last score.”
I’ve searched the forums and found another participant has asked a similar question, in which they used the phrase “when Ellen has been awake for exactly two turns."
I’m predicting that most scenes in my projects would more likely be the result of the player taking an action.
This is akin to what I’ve been trying: “Smugglers Fleeing begins after the player has looked into the keyhole.” In fact what I was hoping to do was “…after the player has looked into the keyhole for the third time.”
I worked around it by using this:
Smuggler Jake can be relaxed or fleeing.
Smugglers Fleeing begins when smuggler Jake is fleeing.
After the player has looked into the keyhole for the third time, now Smuggler Jake is fleeing.
Is that the most straightforward approach?
…
This next one really is a question though, as I’ve struggled against the syntax for weeks. How do you match up table entries with specific objects in the game? Eg:
[code]“Treasures”
A treasure is a kind of thing. A treasure has a number called treasure_points.
Table 1.0 - Treasure Scores
Treasure Name Treasure Reward
“Gold nugget” 10
“Diamonds” 20
“Silver bars” 5
“Jewelry” 5
“Rare coins” 10
“Emerald” 25
“Platinum Pyramid” 30
“Pirate’s Treasure” 30
Brick Building is a room. “You are inside a building, a well house for a large spring.”
Elsewhere is a room. “This is just a treasure storage area.” A Gold nugget, Diamonds, Silver Bars, Jewelry, Rare Coins, Emerald, Platinum Pyramid and Pirate’s Treasure are in Elsewhere. The Gold nugget, Diamonds, Silver Bars, Jewelry, Rare Coins, Emerald, Platinum Pyramid and Pirate’s Treasure are treasures.
When play begins:
repeat with T running through treasures:
if there is a Treasure Name corresponding to the printed name of T in the Table of Treasure Scores:
let N be the Treasure Reward corresponding to the printed name of T in the Table of Treasure Scores;
now the treasure_points of T is N.[/code]
I know it’s not working because T is an object name while the printed name of objects is text. How to resolve this is unclear. What’s the correct syntax?
In fact it would be good if I could go as far as to create objects using a table, and better still if I can assign their rooms via table. Can either of these things be done?