heartless zombie–I think using those rules isn’t going to help much, because you can’t set the pronoun “it” to a plural-named object. I thought making the objects ambiguously plural might help, but that only seems to work with singular-named things:
[code]Arena is a room. Some soldiers are in the Arena. The soldiers are ambiguously plural. The player carries a bouquet of flowers. The bouquet of flowers is ambiguously plural.
Test me with “pronouns/x flowers/pronouns/x soldiers/pronouns”.[/code]
As you can see “it” gets stuck on the flowers and “them” switches back and forth.
I’m not entirely sure what the desired behavior is, but you can peek into I6 to see whether “it” and “them” have referents, and if “them” does but “it” doesn’t, you can replace “it” with “them” in the player’s command so “attack it” gets redirected to “attack them”:
[code]The Arena is a room. Some soldiers are in the Arena. The player carries a rock.
To decide whether the pronoun it is unset: (- LanguagePronouns–>3 == NULL -).
To decide whether the pronoun they is unset: (- LanguagePronouns–> 12 == NULL -).
To decide whether the pronoun they is set:
if the pronoun they is unset, no;
After reading a command when the pronoun it is unset and the pronoun they is set:
if the player’s command includes “it”:
replace the matched text with “them”.
Test me with “pronouns/actions/attack it/i/x rock/pronouns/attack it”.[/code]
Note when the action switches from attacking the soldiers to attacking the rock. This seems like it should be a lot more robust than trying to match the player’s exact command and replace it with something.
(At least I think this works. Won’t ever claim to really understand something in I6.)
Note that if you wanted to try your approach, you’d have to set the itnow to
the substituted form of "[the noun]"
because the noun isn’t text. And you might want to make that a Carry out examining rule rather than After, because more than one Carry Out rule can run but After rules cut off the action. (Not that it’d likely make much difference, since the rules that print the examining text are carry out rules.) But trying to key your behavior directly to “attack it” is fragile, anyway.