View Single Post
Old 12-28-2011, 09:09 AM   #114
JCarter426
Senior Member
 
JCarter426's Avatar
 
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,628
There's a CutsceneAttack function that is supposed to let you have complete control over the animations, attack result, and damage for each round, but I have never managed to get it to work. I eventually gave up because I wasn't actually making a cutscene, I was just recording stuff. However... I'm pretty sure you need to pause the conversation during any attack of any kind (if the attacker or attacked are involved in the conversation).
Code:
ActionPauseConversation();
And then resume it when that's done.
Code:
ActionResumeConversation();
And I don't believe I did this during my attempts with CutsceneAttack, not knowing this at the time. Here's the source code for that function if you want 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,