Jump to content

Make an item animate only once, on demand?


NikaCola

Recommended Posts

What I would like to do is have a light become bright and then fade out during a cutscene. I edited one of the default lights to do this in nifskope using a NiLightDimmerController, set the flag to "Clamped", tweaked the floatdata and it works like I want it to.

 

The problem is that the fading out happens IMMEDIATELY as soon as the cell is loaded, and so the player will never see this animation happen. If I set the flag to "cycle" then the light just brightens and fades out indefinitely with no way to stop it at the right time (once it's all the way dark).

 

I've tried beginning with the light disabled and then enabling it when I want this to happen, but when it enables in game it's clear that the animation has been playing/looping the whole time if set to cycle, as when the light enables it just shows the animation from random points like in the middle or even at the end.

(If it's set to Clamped then the animation already played when the cell loaded so the player won't see it).

 

 

So my question is: Is there a way to control when, exactly an animation like this begins?

 

Thank you for any help!

Link to comment
Share on other sites

To control different animation states in a nif, the animation must be sequenced using a NiControllerManager which holds all the different states (static, fade out, fade in, etc.)


It's possible to construct sequences in Nifskope (you can use the vanilla radio as a reference), but it's tedious work. If you have access to Max 2013, the it's just a matter of animating the emission multiplier, creating two states, and exporting using the official BS plugin.


You should then be able to call and play the fade out sequence using PlayGamebryoAnimation().

Link to comment
Share on other sites

Thank you so much for the reply! I do have 3ds max 2016...do you know if that would work, too? When I try to import the nif I edited into 3ds, I get "invalid string index" error. (And this also happens on the vanilla nif unfortunately too.)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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