Things That Vary

So, I understand that you can create a number that varies, or a truth state that varies:
Foo is a truth state that varies.
Bar is a number that varies.

My two questions are as follows:
Is there a better way to set the initial value than using a “When play begins…” rule?
Secondly, how does on change the values of something that varies?

Sorry if these are really simple questions, I just got into IF a few days ago.

To set the initial value:

Foo is a number that varies. Foo is 7.

Or more concisely:

Foo is initially 7.

(The “initially” syntax tells Inform to guess the type and make it a variable automatically.)

To change the value:

After eating the pineapple: now foo is 5.

“Now … is …” changes a variable to a new value.

Cool. The same thing works with truth-states and other things that vary as well. I just tested it.