Jump to content

Home

[K1] Animation query


Papership

Recommended Posts

Hey all!

 

One problem that consistently nags me, is that every time I pass a red line in the dialog file, all characters reset their animations. Ie, if someone is kneeling, they will get up. If someone is dancing, they will stop, etc. I know that head follow and reorientation(rotating) can be locked via script. But there seems to be no way to stop dialog from resetting animations every turn.

 

I know there is a line in the UTC file (I think it's called NoReorienting or something like that - sorry, no kotor on my work machine), that can be used to lock the character so that dialog doesn't reset them. But as far as I know, there is no script way to activate this either.

 

Whew! So, long story short. Is there a way to stop the dialog resetting my NPC's every turn?

 

Thank you!

Happy Hunting!

~Pap~

Link to comment
Share on other sites

Hey all!

 

One problem that consistently nags me, is that every time I pass a red line in the dialog file, all characters reset their animations. Ie, if someone is kneeling, they will get up. If someone is dancing, they will stop, etc. I know that head follow and reorientation(rotating) can be locked via script. But there seems to be no way to stop dialog from resetting animations every turn.

 

I know there is a line in the UTC file (I think it's called NoReorienting or something like that - sorry, no kotor on my work machine), that can be used to lock the character so that dialog doesn't reset them. But as far as I know, there is no script way to activate this either.

 

Whew! So, long story short. Is there a way to stop the dialog resetting my NPC's every turn?

 

Thank you!

Happy Hunting!

~Pap~

 

Hey, I'm affraid I can't be too much help as I've not really got into this side of KotOR modding yet however have you reviewed this thread; http://www.lucasforums.com/showthread.php?t=143356

 

The guys most likely to be able to help are people such as Pavlos, Silveredge and Inyri, as they are all the most obvious examples that spring to mind of people having to do the above, you could try dropping them a PM.

Link to comment
Share on other sites

You can use a a script instead of the animation function in the dialog file.

 

From nwscript.nss

// 40: Cause the action subject to play an animation  
// - nAnimation: ANIMATION_*  
// - fSpeed: Speed of the animation  
// - fDurationSeconds: Duration of the animation (this is not used for Fire and
//   Forget animations) If a time of -1.0f is specified for a looping animation  
//   it will loop until the next animation is applied.  
void ActionPlayAnimation(int nAnimation, float fSpeed=1.0, float fDurationSeconds=0.0);

 

Example

void main()  
{  
AssignCommand(GetFirstPC(), ActionPlayAnimation(ANIMATION_LOOPING_MEDITATE, 1.0, 8.0));  
}

This is the script I used at the meditation fountain in my Coruscant mod.

Link to comment
Share on other sites

Oh gosh =] I can script animations. Thank you so much for replying, though. It's a specific problem that any animations (called by a script or the dialog) will reset with every line of NPC dialog. So if I've applied an "ActionPlayAnimation(ANIMATION_LOOPING_DEAD, 1.0, 1.0)" to a character. They will magically get up again every line of dialog, whether it is theirs or not.

 

Jon, I have read that thread, I will try the PM idea ;) very clever.

 

~Pap~

Link to comment
Share on other sites

There are two ways of applying animations to characters in dialogue - Through the dialogue file itself (Using the Animations box in DLGEditor). And through scripting using the way in which deathdisco suggested.

 

Looking at your problem, you've assigned an animation to an NPC in DLG Editor in one of the red nodes, and when the next red node is activated - The animation stops and the character goes back to the normal stance? The thing is, that's mean't to happen, the game will just assume you don't want the animation to continue unless you state otherwise - You need to manually set ANIMATION_LOOPING_LISTEN_INJURED to the NPC in every red node until you reach the point where you don't need the NPC to display that animation anymore. :)

Link to comment
Share on other sites

{snip}

So if I've applied an "ActionPlayAnimation(ANIMATION_LOOPING_DEAD, 1.0, 1.0)" to a character. They will magically get up again every line of dialog, whether it is theirs or not.

{snip}

 

If you only set the duration to 1.0, then yes the NPC would get up soon after. You could extend the amount of time the animation plays or try -1.0 as stated in nwscript.nss

// 40: Cause the action subject to play an animation  
// - nAnimation: ANIMATION_*  
// - fSpeed: Speed of the animation
// - fDurationSeconds: Duration of the animation (this is not used for Fire and
//   Forget animations) [color=palegreen][i]If a time of -1.0f is specified for a looping animation[/i][/color]  
//   [color=palegreen][i]it will loop until the next animation is applied.[/i][/color]  
void ActionPlayAnimation(int nAnimation, float fSpeed=1.0, float fDurationSeconds=0.0);

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...