PDA

View Full Version : Dead animation problem


zbyl2
02-06-2009, 12:38 PM
I'm getting a problem with dead animation...
AssignCommand(oVisas, ActionPlayAnimation(ANIMATION_LOOPING_DEAD, 1.0, -1.0));
It works fine, problem is that in next node Visas stands up again. That was easy to fix though, I used "1412_scanning" animation in DLG Editor and she looks like she's dead during conversation.
Problem is, that after dialog ends she stands up again. Anybody know how to make Visas lying on ground all time after the dialog?

DarthStoney
02-06-2009, 02:14 PM
I'm not positive about this but did you change her .utc file I think it is set to no permanent death. Not sure if this effects that or not.

zbyl2
02-06-2009, 02:26 PM
It shouldn't affect to this as I'm not making her dead, just using animation so she looks like this for players.

DarthStoney
02-06-2009, 02:58 PM
Did you fire the dead animation at the end of the dialog sequence also?

zbyl2
02-06-2009, 03:02 PM
Tried but it didn't work.





EDIT: I found a workaround. I wrote a script to kill Visas for good
SetMinOneHP(oVisas,FALSE);
AssignCommand(oVisas,SetIsDestroyable(FALSE,FALSE, FALSE));
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDe ath(),oVisas);
And later I wrote script to spawn Visas in module
object oVisas = SpawnAvailableNPC(NPC_VISAS,GetLocation(GetObjectB yTag("sp_visas")));
AssignCommand(oVisas, ActionStartConversation(GetFirstPC(), "852sacri", 0, 0, 0, "", "", "", "", "", "", 0, 0xFFFFFFFF, 0xFFFFFFFF, 0));
Problem is that now there are two Visas in module (one dead and one alive) so I will need to do something with this dead body... Anyway, problem solved... I think.

swfan28
02-06-2009, 03:17 PM
I remember a similar problem with the Jedi Masters at Dantooine rebuilt enclave while trying to add Vash to the scene during K2RP/M478 restoration. It seems that NPCs will only stay down if the dead animation is fired at the end of the conversation from idle position (all actions and effects cleared). In that dialog we let the masters stand up briefly while the camera was pointed at the Exile and Kreia. You could try doing the same during a fade to black perhaps?

DarthStoney
02-06-2009, 03:19 PM
I beleive it may be handled through the character user defined script. Just like the scripts for the jedi masters at the enclave. I think I have one I used for Vash on M4.

zbyl2
02-06-2009, 03:41 PM
My workaround sucks. I forgot I can't use DestroyObject if object is dead.
Anyway, I was trying to use different anim... I found a way!
AssignCommand(oVisas, ActionPlayAnimation(10083, 1.0, (-1.0)));
Using this in very last node of conversation works just fine :) There's another problem though, she's "dead" but her lightsabers don't know about it...
http://img231.imageshack.us/img231/4603/80321380wg5.jpg
I will try to unequip her weapon, hopefully it'll fix that problem.

Anyway, thanks for the help (both of you) :)

swfan28
02-06-2009, 03:45 PM
You could just try the SetLightsaberPowered() function to switch off the sabers.

DarthStoney
02-06-2009, 03:51 PM
My workaround sucks. I forgot I can't use DestroyObject if object is dead.
Anyway, I was trying to use different anim... I found a way!
AssignCommand(oVisas, ActionPlayAnimation(10083, 1.0, (-1.0)));
Using this in very last node of conversation works just fine :) There's another problem though, she's "dead" but her lightsabers don't know about it...
http://img231.imageshack.us/img231/4603/80321380wg5.jpg
I will try to unequip her weapon, hopefully it'll fix that problem.

Anyway, thanks for the help (both of you) :)

You could try adding a line before the animation of
AssignCommand(oVisas, SetLightsaberpowered(false)); I think this is it, not positive but there is a script command for setting a light saber on or off.

oops to slow! go with swfan's its right.

zbyl2
02-06-2009, 03:56 PM
It wouldn't really work as her sabers are off just after conversation, but later I attack Nihilus and she switch sabers on so there would be no place to put this script.
Anyway, I used ActionUnequipItem() to unequpi her sabers and it works fine now :)

swfan28
02-06-2009, 04:04 PM
zbyl2 wrote:
It wouldn't really work as her sabers are off just after conversation, but later I attack Nihilus and she switch sabers on so there would be no place to put this script.
Anyway, I used ActionUnequipItem() to unequpi her sabers and it works fine nowThen you'd need to remove her from the party or the AI would take over and have her join the battle after the dialog. You could use the same trick that is used to remove the partymembers when fighting the Jedi masters (DS). I think there's also a way to disable the AI for a creature but I've never tried it myself...

zbyl2
02-07-2009, 11:18 AM
Then you'd need to remove her from the party or the AI would take over and have her join the battle after the dialog. You could use the same trick that is used to remove the partymembers when fighting the Jedi masters (DS). I think there's also a way to disable the AI for a creature but I've never tried it myself...
Heh, it was much simpler. She didn't switch on sabers (and later attack Nihilus) because of her AI script but because of her faction. When I changed her faction into neutral via script, it worked perfectly.
This time problem is really solved.