I am fiddling around with some fire stuff. Fun fire stuff. I have
included the Fire Rules found in the Inform 7 Manual. They compiled -
as did my room. Only there is no stove in the room. There is no fire
in the room either. Even when all I had was:
*The Kitchen is a room. In the Kitchen there is a stove. The stove is
fixed in place. In the stove there is a fire. The fire is lit.*
I can't see anything wrong with that - should be pretty standard I
thought (said the noob).
I have added:
*The fire is a flammable flaming fixed thing. It has endurance 100.*
There are my error messages:
Problem. You wrote 'In the stove there is a fire' : but this seems to
give a worldly relationship to something intangible, like saying that
'in the box is a text'. Perhaps it came to to this because you gave
something physical a name which was accidentally something meaningful to
me in another context? If so, you may be able to get around it by
rewording ('In the box is a medieval text') or in extremis by using
'called' ('In the box is a thing called text').
Problem. You wrote 'The fire is lit' : but that suggests that an
adjective has some sort of value, like saying 'Open is a number' or
'Scenery is 5': but of course an adjective represents something which is
either true or false.
Problem. You wrote 'The fire is a flammable flaming fixed thing' : but
this seems to say that a thing is a value, like saying 'the chair is 10'.
Anyone know what I'm doing wrong? Please help.
This lets you see the stove:
The Kitchen there is a room. In the Kitchen there is a stove. The
=D Thank-you. I fixed it. Gah - one little word. Got the other
problems solved too - it doesn't like the word 'fire' for some reason -
I pressume it's used elsewhere - so I changed them to coals =D. You rock.
Now this doesn't work:
When burning something when the player is not carrying something flaming:
Open stove.
[if the stove is open]say "You touch the noun to the coals." [else]
say "you open the stove and light the noun."[endif]
I get the error message:
Problem. You wrote 'say "You touch the noun to the coals." say "you open
the stove and light the noun."' : but I can't find a verb here that I
know how to deal with, so I am ignoring this sentence altogether.
Two possibilities:
(1)
say "[if the stove is open]You touch the noun to the
coals.[otherwise]You open the stove and light the noun.[end if]"
(2)
if the stove is open, say "You touch the noun to the coals.";
else "You open the stove and light the noun."
You can only use the [if..],[otherwise] and [end if](note the space)
inside a string...otherwise they're comments. For some reason you can't
use [else] in a string, it has to be [otherwise].
The bracketed conditionals [if], [else], etc. are only for use *inside*
text. Outside a piece of text, brackets mean you're writing a comment,
but you can use the if/otherwise statements instead. Also, you have the
wrong syntax for the rule (I think you want an instead rule) and for
opening the stove, and if your game has more than one room, you should
probably make sure the player is in the same place as the stove. I
think you want something like this:
<code>
Instead of burning something when the player is not carrying something
flaming and the player can touch the stove:
if the stove is open
begin;
say "You touch [the noun] to the coals.";
otherwise;
now the stove is open; [you could also use "silently try opening
the stove" --vw]
say "You open the stove and light [the noun].";
end if.
</code>
vw
So I looked throught the code and found:
<code>
Instead of burning something flammable when the player is carrying
something flaming (called the flame source):
say "You light [the noun] with [the flame source].";
change the heat of the noun to flaming.
</code>
I basically added the last line of code into mine (well, yours and the
manual's actually). But got the following error:
Problem. You wrote 'change the heat of the noun to flaming' : but I
can't find a verb here that I know how to deal with, so I am ignoring
this sentence altogether.
Here's what I wrote:
<code>
Instead of burning something when the player can touch the stove and the
player is not carrying something flaming:
if the stove is open
begin;
say "You touch [the noun] to the coals.";
otherwise;
now the stove is open;
say "You open the stove and light [the noun].";
end if.
change the heat of the noun to flaming
</code>
Now according to what I think is logical it should work. I thought
maybe the if/otherwise thing got in the way - so I tried putting the
"change the heat..." thing first:
<code>
Instead of burning something when the player can touch the stove and the
player is not carrying something flaming:
change the heat of the noun to flaming
if the stove is open
begin;
say "You touch [the noun] to the coals.";
otherwise;
now the stove is open;
say "You open the stove and light [the noun].";
end if.
Problem. You wrote 'change the heat of the noun to flaming if the stove
is open begin' , but 'heat of the noun' seems to be a property whose
value is a heat, whereas I was expecting to find an entry in a table there.
Problem. In the sentence 'change the heat of the noun to flaming if the
stove is open begin' , I was expecting that 'flaming if the stove is
open begin' would be a value of some sort, but I couldn't make sense of
it in any context.
Problem. You wrote 'otherwise' : but this is an 'else' or 'otherwise'
with no matching 'if', which must be wrong.
So I changed it back.
Please help me *annoys good peoples again*
The period after "end if" tells Inform that you're done defining this
rule. Change it to a semicolon and it should work; Inform will still
consider the rule finished when you start a new paragraph.
> Now according to what I think is logical it should work. I thought
> maybe the if/otherwise thing got in the way - so I tried putting the
> "change the heat..." thing first:
> <code>
> Instead of burning something when the player can touch the stove and the
> player is not carrying something flaming:
> change the heat of the noun to flaming
> if the stove is open
> begin;
> say "You touch [the noun] to the coals.";
> otherwise;
> now the stove is open;
> say "You open the stove and light [the noun].";
> end if.
This time, you need another semicolon: after "change the heat of the
noun to flaming".
vw
It works. Dangit - the punctuation part of coding is what I hated about
TADS. I used to always mess it up. Thanks dude/dudette - much
appreciated. The code works - now time to pretty it up.
I also want to add and updraft from the stove so I can make the paper
rise - but I guess that is for later.
Cheers =)