![]() |
BronzeAn interactive fiction by Emily Short (2006) - the Inform 7 source text |
| Home page Contents Previous Next Complete text | Section 3 - Sounds
A thing has some text called sound. The sound of a thing is usually "silence". The block listening rule is not listed in any rulebook. Carry out listening to something: if in darkness, say "The [sound of the noun] sounds like [a noun]."; otherwise say "From [the noun] you hear [the sound of the noun]." Definition: a thing is audible if the sound of it is not "silence". Echolocating is an activity. Before printing the name of something audible (called target) while echolocating: if the target is not the player, say "[sound] from [if the target is not the player]the [end if]" Rule for printing the name of the player while echolocating: if the player is not audible, say "yourself"; otherwise say "your own [sound of the player]" Rule for printing the name of something (called target) which is not visible while echolocating: say "[roman type]"; if the target is the player begin; say "yourself"; rule succeeds; end if; let place be the holder of the target; let way be the best route from the location to the place; if way is a direction, say "[way]"; otherwise say "[if the target is in location]immediate vicinity[otherwise]middle distance[end if]". |