View Single Post
Old 01-16-2012, 01:33 PM   #63
Fallen Guardian
Wandering the Galaxy...
 
Fallen Guardian's Avatar
 
Join Date: Aug 2010
Location: Unknown Regions
Posts: 1,286
Current Game: Knights of the Old Republic
Veteran Modder Helpful! 
Quote:
Originally Posted by JCarter426 View Post
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:
Code:
// 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:
Code:
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.
Quote:
Originally Posted by Qui-Gon Glenn View Post
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?

EDIT: Thanks JCarter426
Thanks both of you.


The truly fallen cannot return to the light. If someone "falls" and "returns," they never really, truly fell.

Current Work in Progress: Dantooine Tension

Released Works
Blaster Pistol Enhancement
Dustil Restoration
Ebon Hawk Texture Enhancement
Gaffi Stick Improvement
Weapon Model Overhaul Texture Rework (Thanks to Toasty Fresh!)
Sunry Murder Recording Enhancement
VP's Hi Poly Tin Cans - KotOR 1 Version
Fallen Guardian is offline   you may: quote & reply,