View Single Post
Old 01-16-2012, 02:15 PM   #61
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,640
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.


JCarter426 is offline   you may: quote & reply,