With Harry safely off to beta-land, I’ve shifted gears to a new scenario.
I have a non-player character with a generic name (other test subject) until the game player does some things, then the NPC gets a proper name.
The Adv3Lite Tutorial offers code for making this work (The Art of Conversation, Queries and Suggestions)…
In my code, it looks like this…
// other candidate character
otherAstronaut: Actor 'other test subject;other candidate'
"The test subject is approximately your age, with a trim, physically fit
physique not unlike your own.<.p>"
globalParamName = 'otherAstronaut'
person = 3
contType = Carrier
setName
{
proper = true;
name = 'Alexi';
return name;
}
;
It does not work as expected. After I call setName, when I enter talk to Alexi in the game window, I get…
That’s right. In the Angela example in the Tutorial, ‘angela’ was already in Angela’s vocab property, so it didn’t need adding in the makeProper() method, whereas your set-up was slightly different.
Your solution is fine, and I’m glad you managed to find it so fast. An alternative would have been to do this: