Name property
Posted: Sat May 21, 2011 7:24 am
I had a condition in the name property of my NPC that would return a different string depending on whether the NPC had the attribute "special". In the after property routine, I specified an ASK topic that would have the NPC reveal her name, thus changing the name property by giving the NPC the "special" attribute.
Somehow, this code was apparently causing the name property to be displayed after every turn when the NPC was in the location! At least, that's what it looked like. For instance, a wait command would result in something like "young womanTime passes."
I have no idea why the name property was being called every turn. However, when I changed the code to a much more logical solution -- simply changing the value of the name property in the after routine -- everything worked. I'm glad I thought of the better way, but why does putting a condition in the name property produce such bizarre results? Are all name properties called every in their location?
Just a topic for discussion/consideration. :-)
Somehow, this code was apparently causing the name property to be displayed after every turn when the NPC was in the location! At least, that's what it looked like. For instance, a wait command would result in something like "young womanTime passes."
I have no idea why the name property was being called every turn. However, when I changed the code to a much more logical solution -- simply changing the value of the name property in the after routine -- everything worked. I'm glad I thought of the better way, but why does putting a condition in the name property produce such bizarre results? Are all name properties called every in their location?
Just a topic for discussion/consideration. :-)