without looking at your file, here's how booleans~flags work:
to initially set (and ALSO to re-set, aka change), a boolean:
in code:
as a tag:
<attr name="blah" type="boolean">false</attr>
~OR~
<attr name="blah" type="boolean">true</attr>
as a script:
Object.Attribute = Value_or_Expression
Object.Attribute = false
~OR~
Object.Attribute = true
do note the: *NO* quotes on the Value, this is because 'false' and 'true' are special, they're recognized as Booleans'~Flags' Values
in gui-editor:
(whatever) Object -> Attributes (tab) -> Attributes -> Add ->
Attribute Name: ________
Attribute Type: boolean
Attribute Value: (true or false)
and there's also the scripts:
SetObjectFlagOn: false -> true
SetObjectFlagOff: true -> false
and the "if" Script too:
if -> [EXPRESSION] -> Object.Attribute = false_or_true ->
-> then do: (whatever) Script (add a script)
else if > [EXPRESSION] -> Object.Attribute = true_or_false ->
-> then do: (whatever) Script (add a script)
----------
to then use a boolean's setting, you use the "if" Script (in code below), an example:
<object name="orc">
<inherit name="editor_object" />
<attr name="dead" type="boolean">false</attr>
<attr name="displayverbs" type="listextend">Fight</attr>
<attr name="fight" type="script">
if (orc.dead = true) {
msg ("The orc is already dead, silly. But, it then magically comes back to life again.")
orc.dead = false
} else if (orc.dead = false) {
msg ("You kill the orc.")
orc.dead = true
}
</attr>
</object>