Jump to content

Looping animation continously


Falkner1992

Recommended Posts

Ok, my problem: I use the PlayAnimation command to get the PC in my mod to play the ANIMATION_LOOPING_DEAD_BACK animation, which is basically the 'dead' animation. Here it is:

 

AssignCommand(oPC,ActionPlayAnimation(ANIMATION_LOOPING_DEAD_BACK,1.0,1.0));

 

The last "1.0" is how long PC will play the animation until he stops, what I want to do is make it so he keeps playing the animation continously until, through the Actions Taken of a dialogue choice, he is commanded to stop playing it and get up. I tried using a While Loop, and it worked, but it also caused a strange error when I playtested it, something like "Error OID: 8000001 TOO MANY INSTRUCTIONS", something like that.

 

Anyway, is there a simpler way of doing what I described (getting the animation to play continously until the PC is commanded to stop) and a way that doesn't give me that error? THanks.

Link to comment
Share on other sites

There are a few alternatives, if it works the same way as in NWN2. Some ideas:

You could apply a permanent knockdown effect to the NPC, and then remove the effect when you want the NPC to get up.

If you have a PlayCustomAnimation command in addition to the PlayAnimation command, you could try that one instead.

I've found an interrupted animation is often caused by the NPC's heartbeat script firing off another idle animation, which it does on occasion. If you don't strictly need a heartbeat script on this NPC, you could try removing it, or making a custom one with only the bare minimum routines you need.

If you go with a custom heartbeat script, you could include a fresh call to play the animation that would fire on every heartbeat, but you would have to have it first check for a condition to be true, so that you can turn that condition on and off as needed.

 

Again, I'm not sure which of these abilities are available in NWN1, but I hope it helps.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...