Aller au contenu

Photo

NPC dies but still stands


  • Veuillez vous connecter pour répondre
18 réponses à ce sujet

#1
Julian Gellert

Julian Gellert
  • Members
  • 18 messages
... Is anyone else getting this silly-looking bug where you kill an npc, but he's still standing around with animation frozen?

For example - you kill a mage as he casts a spell, he's dead, but the corpse is still standing upright casting a spell.

Happens when a NPC is running, too. Corpse keeps doing the running animation.

I wonder if this is a general problem with NWN2 - because I can't find reports about it no matter how much I google, and it happens on my module a lot. So I am naturally wondering if it was me that screwed something up on the module - or it just shows on my machine - or if it will show up when people play it, too.

It's just very annoying.

#2
Arkalezth

Arkalezth
  • Members
  • 3 193 messages
Does it happen to you regularly? I've ran into that bug a few times, but 99% of the enemies drop to the floor when they die.

#3
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
This happens often when you cast sleep on an opponent and then kill it. It also may happen with other immobilizing effects too, but I've noticed it primarily with sleep.

#4
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
I've seen it a lot in my modules, but I thought it was just matter of the system being stressed, like where some other animation or action cancels out the dying animation. Come to think of it, I put some extra AI stuff on the on-damaged script, which would fire almost simultaneously to the on-dying script. I know sleep in particular changes the way the default AI on-damaged/physically-attacked works, might that be the connection?

#5
foil-

foil-
  • Members
  • 550 messages
This problem has occurred to me in everything from Heroes of Neverwinter, to Dragon Age, to some shooters. It doesn't happen often but I haven't seen too many games that don't get hit by it occasionally. I've come to accept it a part gaming and am only mildly annoyed when it happens now. In some older games, it would happen on bosses and the script that would trigger the end of battle and final rewards (or that important key to progress) would never go off. That was very annoying. Especially after a very difficult battle. In fact, I think that happened to me as recently as dragon age origins DLC.

edit: corrected some spelling mistakes :crying:

Modifié par foil-, 06 novembre 2011 - 03:19 .


#6
dunniteowl

dunniteowl
  • Members
  • 1 559 messages
I recall a creature in the Original Fallout that did this. I killed it (after much gnashing of teeth and wailing over restarts) and it still stood there, gnashing it's teeth and swishing it's tail. This is not just NWN2. I've seen this only twice in NWN2 in all the times I have played. What others say about spell effects does cause this as far as I know.

dno

#7
Julian Gellert

Julian Gellert
  • Members
  • 18 messages
Alright, then I'll have to learn to live with it.

A shame for corpses that don't fade...

#8
Arkalezth

Arkalezth
  • Members
  • 3 193 messages
They usually fade, though it depends on how they've been set in the module.

#9
Julian Gellert

Julian Gellert
  • Members
  • 18 messages
I've set them to take a few minutes to fade, for necromancer-related stuff. :P

#10
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
I've found a clue as to the cause of this kind of bug! Apparently, scripts can still run on a NPC even after the NPC is technically dead. The most obvious of course are the on-death script and the on-damaged script. If a script orders a dead NPC to move or otherwise play an animation, then it's possible that the command will interrupt the prone animation given to the NPC at death, and you'll end up with a zombie.

If you assign a command to a creature using DelayCommand, then there's always a chance that the creature might die in the meantime, and cause the bug. Dead creatures also retain their tags, so it's possible that a script can order them about that way, too. I'm still testing, but it's possible that the other event scripts, like on-physically attacked, or even on-perception, might also be run occasionally on the recently deceased. You can cut down on this bug by sticking a check in your scripts at the beginning:
if (GetIsDead(OBJECT_SELF)) {return;}

#11
I_Raps

I_Raps
  • Members
  • 1 262 messages
While you're looking into this, see if you can explain the compass-needle corpse phenomenon.

#12
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages

I_Raps wrote...

While you're looking into this, see if you can explain the compass-needle corpse phenomenon.


What's that, exactly?  The corpses all face north?

#13
I_Raps

I_Raps
  • Members
  • 1 262 messages
No, they point at your character as you move around them. Sydney Natale is the one I remember, but it has happened a few other times, I think.  Maybe Garius (both versions), your treacherous companions, etc.  Cutscene actors who don't know when to quit emoting, now that I think of it.  Perhaps a whole new meaning for "chewing the scenery."

Modifié par I_Raps, 13 mars 2012 - 08:30 .


#14
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
After some more testing, I've found that the On-Coversation script does fire after death, probably due to the shouts that pass between NPC's when they're attacked. The default scripts have a check for this, though.

The heartbeat and on-physically attacked scripts do not fire, nor does the on-disturbed or on-blocked. I haven't tested the on-spell-cast-at.

In testing, it seems that the zombie problem happens when a creature is attacked my multiple enemies in a single round. For me it was a line of archers all shooting at their designated target, but maybe something similar happens with mages that attract a lot of aggro with TonyK's AI.

It might be something hard-coded, where the impact effects of later hits cancel out the prone animation and death effect. Does anyone know how exactly the visual side of death is handled? I know there's a prone animation, and then a freeze animation to stop the breathing, but then there's the whole falling-down part, too. So I guess there has to be some bit of choreography going on in the system, with some delaycommands somewhere. Are there other complex animation bits, like casting or dodging, that might interfere with the death animation?

As for I_Raps' compass point problem, I noticed that the orient-to-object function used by the ga_ scripts has a 'lock' feature, where the NPC will continuously turn to face a moving target. That feature must have been programmed using some sort of pseudo-heartbeat, and so all we need to do is find where that bit of code is and insert a GetIsDead check in it.

#15
Axe_Edge

Axe_Edge
  • Members
  • 280 messages

I_Raps wrote...

No, they point at your character as you move around them. Sydney Natale is the one I remember, but it has happened a few other times, I think.  Maybe Garius (both versions), your treacherous companions, etc.  Cutscene actors who don't know when to quit emoting, now that I think of it.  Perhaps a whole new meaning for "chewing the scenery."


*Unintentional OC spoiler was below, I forgot this was in the General Discussion.  This post concerns spinning dead bodies.  Didn't want to ruin a new player's experience, so, I decided to just move it to the OC threads*

My moved spoiler post:

Spinning dead bodies turning to face PC

Modifié par Axe_Edge, 14 mars 2012 - 02:47 .


#16
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
Now it seems that dead creatures still get perceived, and trigger the on-perception event for living creatures. That's gotta be useful for someone, maybe trying to script a scavenger or having a party member freak out every time they see a corpse.

#17
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
So I kludged together a fix - I used a delay command on the on-death script to PlayCustomAnimation("proneb") and freeze animations. Fun fact, if you apply freeze animations without a delay, the dead guys end up frozen in mid-fall.

I'm beginning to think that the root cause is the new PlayCustomAnimation function. The old BioWare PlayAnimation function was tied to the action queue, which meant that it hardly ever played when it was supposed to. So OEI begot the PlayCustonAnimation function to override such timidness, but the new function is so bold that it will even order the dead to dance. Hence the various PlayCustomAnimation calls scattered far and wide can interfere with the animations called at death.

#18
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
It turns out my kludge doesn't work that well. After leaving the area and returning, all the corpses are standing up.

Instead, now I'm calling a 'ClearAllActions(TRUE);' when a dead creature fires the 'on-damaged' event, as well as my own 'tactics' script. This seems to cut down on 90% of the standing dead, but a few occasionally remain.

My best guess now is that when an already dead creature gets hit again, the on-damaged script still fires, and any commands therein are executed, which can interrupt the standard death animations. For example, a creature gets hit and is killed, but then gets hit again in the same round. The on-damaged script fires for the second hit, and orders the creature to attack their attacker. This order stops the death animation started a half-round earlier, but since the creature is already dead, the on-death script doesn't fire a second time, nor does the hidden script that handles the death animation.

Modifié par Lugaid of the Red Stripes, 01 avril 2012 - 03:19 .


#19
rdmoore6

rdmoore6
  • Members
  • 6 messages
The fallen opponent who refuses to convert to "remains" can be a quest breaker. If the NPC is supposed to drop a key, then the quest cannot continue. "Sleight of Hand " does not work on a fallen opponent who is known to have a goodie such as a key.

In the Crossroad Keep battle I have tried various methods of killing the pair of arcane brothers in the foyer. One of them inhibited any use of magic by my designated killer. None of them resulted in "Remains" rather than a fallen NPC with health "Dead". Is there some way to convert a corpse to "remains"?