Thursday, December 13, 2007

ActionDoAnimation

I started adding animation to some of the NPCs today and they all mostly work. So far, they have all been OnHeartbeat scripts, so the script fires every six seconds. I'm hoping to use more OnSpawn animation scripts in the larger areas, as the OnHeartbeat scripts can add extra burden on the processor. In general, OnHeartbeat is the last resort. Two people are cooking, one person is drinking, and another person is supposed to be sitting. From what I was told, the ActionDoAnimation(ANIMATION_SIT) script was supposed to be unworkable in the current engine, but I am able to get the NPC to sit; I just can't get him to stay sitting. I'm sure there is a workaround this with using the OnSpawn. Unfortunately, that will mean he will stay standing after an OnDisturbed script fires. I can add the ANIMATION_SIT at the end of a conversation involving him, too. Either way, I am sure I can work at this from a couple different angles.