Having trouble modifying my android.

Having defined a value called part code…

A part code is a kind of value. Some part codes are standard, camo, store, twinreact, N/A.

…described a rough human anatomy…

…And established an android as a kind of person…

An android is a kind of person.

…I now want to say:

The part code of every head which is a part of an android is usually standard.

However, this results in an error. I’m guessing I’ve gotten the syntax of this last line wrong in some small way, but I can’t seem to spot it.

What am I missing?

I don’t think you’re missing anything. When you use “property X of kind Y is usually Z”, you can’t add any qualifiers - it has to be all objects of that kind.

You can set it when play begins with something like:

When play begins:
   Now the part code of every head which is a part of an android is standard.

Assuming you actually want them to all be standard, and it actually works. (If not, an explicit loop would)

Zarf’s solution doesn’t let you override the part code for specific heads. You could try this (I’m assuming that “N/A” is the code you want for non-android heads…)

The part code of a head is usually N/A. When play begins: now every N/A head which is part of an android is standard.

L33T is an android. L33T's head is camo.

Ah, so I’m asking for the impossible? Good to know - I’ll set their heads when play begins, then.

While I’m already distracting you, I might as well mention that I’m planning to have several kinds of android, each of which will have a loadout that overrides the part code for specific parts. Would there be an easy way to do this which doesn’t depend on making a giant multi-line “when play begins” section?

Sometimes the big block of setup code is the easy way.

You may want to consider storing the loadout information in a table, and looping through the table.

Table of Android Part Codes
android type    head code     arms code    torso code    legs code
"hunter"          camo            camo           camo           camo
"medical"         standard       store           twinreact      standard

etc.

At this point you might as well say ‘The head of L33T has part code camo.’ for every robot.