01-16-2012, 01:33 PM
Wandering the Galaxy...
Join Date: Aug 2010
Location: Unknown Regions
Current Game: Knights of the Old Republic
Originally Posted by JCarter426
What you're looking for is CutsceneAttack. It's supposed to let you have complete control over the animations, attack result, and damage for each round. I have never actually managed to get it to work, but then again it's been some time since I last tried it and I've learned a lot since then. I really should try it again, but I'm busy/lazy. Anyway, here's the source code for it:
// 503: CutsceneAttack
// This function allows the designer to specify exactly what's going to happen in a combat round
// There are no guarentees made that the animation specified here will be correct - only that it will be played,
// so it is up to the designer to ensure that they have selected the right animation
// It relies upon constants specified above for the attack result
void CutsceneAttack(object oTarget, int nAnimation, int nAttackResult, int nDamage);
Here are the attack results:
int ATTACK_RESULT_INVALID = 0;
int ATTACK_RESULT_HIT_SUCCESSFUL = 1;
int ATTACK_RESULT_CRITICAL_HIT = 2;
int ATTACK_RESULT_AUTOMATIC_HIT = 3;
And the animations are in animations.2da. combatanimations.2da explains which animations go with which, in case you need it. And I'm not sure if you have to add 10000 to the animation number like you must with ActionPlayAnimation. I don't believe you do, though.
And if you want Force powers, those functions are right above CutsceneAttack in nwscript.
Originally Posted by Qui-Gon Glenn
This is a good question, that I cannot answer fully, although I think I have a few ideas. JCarter426 is around here a bit lately, so hopefully he can fill in the gaps and give a real explanation.
I would think that there is a number in combatanimations.2da that corresponds to the power blast, and any other combat animation, right?
What number that is.... that is the difficult part. Is there a way to determine what animation actually is the power blast? Has someone already done this for us?
Thanks both of you.
quote & reply,