Jump to content

Forcing an Animation when Stamina depletes


FireFlickerFlak

Recommended Posts

When stamina reaches zero I want NPCs with this effect (and preferably the player also, but let's start with NPCs) to go into an animation. I also want to control when they exist the animation. For now, lets say it is the bleedout animation.

 

How would I go about doing this?

 

I have not worked with animations before, but it seems like I need to use playidle() since the other animation commands are documented as causing issues. I do not know where to find the bleedout animation in the CK. I am also not sure how to stop the actor from exiting the animation too early or from ignoring the command, etc.

Link to comment
Share on other sites

Have a MGEF with a condition GetAV Stamina w/ a value of when you want them to play the idle, add a script with OnEffectStart, If akCaster.IsBleedingOut(), then play your idle - PlayIdle(YourIdlePropertyHere). In OnEffectFinish have no Ifs, just PlayIdle(Loose). Make an Idle property for Loose as well. I think the idle you're looking to fill it with is called something like Idle_StopLoose but I can't remember exactly.
Link to comment
Share on other sites

"Other animation commands causing issues" is simply a misinformation. I always use and recommend using SendAnimationEvent(). Totally safe, and has many advantages like not needing to define the parameter as property. You only need to define the idle object is when CK requires them itself, like for idle markers.

 

You won't find the bleedout animation in CK, because all what CK knows are AnimationEvents defined in the behavior files. To start/end the bleedout state the behaviors are using the animevents BleedoutStart and BleedoutStop. But since the only place where BleedoutStart is used requires a local AnimEvent (one raised at certain places inside the behaviors) I don't even know how the bleedout animation can be played without putting the character into bleedout. Which you probably dont want.

 

So the only animations you could use with vanilla means are "simple" animations, those which are used by the game in "simple" situations. A few dozens in total. The easies way in this case: define your animation with FNIS, and SendAnimationEvent() with the FNIS created AnimEvent. This way you can use any available character animation file. For example bleedout_idle.hkx.

 

FNIS will also help you with providing an animevent when the animation is finished. Vanilla animations (or their behaviors, to be more precise) don't do that.

 

There is another problem you will have to tackle, using FNIS or not, playidle() or sae(). Playing animations doesn't stop the actor from further listening to the engine. Like playing sandboxes. So it can very well be that the character slides away to the next sandbox activity while playing your animation. This can be avoided with a DoNothing package, for example.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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