Jump to content

Implementing Custom animation with specific condition


Recommended Posts

Posted

Hi all!

 

I made a pack of a new animations for the characrer (no replacement) to play every time that player aproach closely to an NPC, so in that moment the players move a bit his shoulders to evade the npc.

 

I like to know how can i trigger the animation in that condition. I'm a noob in that kind of things. Don't know if i have to use Dynamic Animation Replacer, Animation Motion Revolution or an other thing. 

 

I want to play the animation when:

Player is not in combat

The animation depends of the speed of the player (walk, run or sprint)

The player colision with the npc from right/left/forward/behind. 

 

Is there a way to do that?

 

Thank you!

 

Posted (edited)

I don't know about any others, but I don't think Dynamic Animation Replacer can quite do it: it can definitely fulfill the first two requirements (play when not in combat and depending on walking speed). For DAR, you'd make a folder with the animation you want to play, and put a text file named "_conditions.txt" in it with the conditions where you'd like it to play. For a non-combat sprint animation, for instance, the text file would read "IsSprinting() AND NOT IsInCombat()". You can also add checks for movement direction or make them player-only, if needed. Check the complete list of valid functions in the DAR mod description under Function List.

 

However, I don't think DAR has a function or entry point for actor collision. Without one, things get a little tricky (though not impossible). Skyrim plays dialogues (Quest: DialogueGeneric -> Misc Tab -> (ActorCollideWithActor)) when you bump into people, you could just attach a script to that dialogue that sets a variable that DAR can check (and unsets it once the animation should stop). But that's not a good solution. You'd need to attach this to every ActorCollideWithActor dialogue. You'd get most of them with just the DialogueGeneric ones, but any NPC with a custom collide dialogue won't trigger the animation. And I doubt that this solution would be fast enough to feel snappy.

 

There might be another solution by adding the animations as Idle Animations, but I've never worked with those, so I don't know anything about them. I only just found that tab because I was looking for a solution to your problem. Need someone more experienced with animations to weigh in on that bit.

 

It's interesting though, because it sounds like the solution should be fairly easy...

 

EDIT: I think this is actually something that's close to what's FNIS was made for, maybe try finding a mod author who's added stuff with FNIS.

 

Edited by Frayed
Posted

Hi!

 

Thanks for your reply and yor time! It's a shame that the author of DAR is no active anymore.

 

Maybe i should focus on thinks that are easier. 

 

My goal is to make the trivial thinks of the character more alive. My next step was going to be an animation to desacelerate and acelerate again if you change direction move fast. Like a transition between the direction changes. 

 

It is that posible?

 

 

Posted

Just saw that there is a mod called movement behavior overhaul that do the same that i was intendet to do. Maybe i should try to see his annotation .txt and try to replicate them. 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...