FinalFrog Posted April 19, 2012 Share Posted April 19, 2012 Here's the specifics of my problem: An npc is scheduled to interact with an object with a special idle animation during a scene. At a specific point in the animation, say 2.6 seconds into it, I want an actor to die. I've tried setting a script to start and wait a specific period of time at the end of the previous phase/beginning of the current phase, but the time between the start of the phase and the start of the animation seems to vary. Looking at Bethesda's scripts, it appears that they use something called OnAnimationEvent in similar cases. Unfortunately it's unclear in both the code and the wiki how this works. After studying it for a while I decided that the intuitive way for OnAnimationEvent to work would be for the RegisterForAnimationEvent to tell Papyrus to run the corresponding OnAnimationEvent when the animation is used by the specified reference (say an actor) in the current frame (say a scene or quest stage). But looking at several places Bethesda uses this command confuses me. In particular looking at the execution of the rebel in the Intro sequence, the rebel is obviously killed during the animation, but the corresponding OnAnimationEvent contains no commands to kill the rebel. (As a side note, I can't seem to find that particular kill/sethealth 0 command ANYWHERE in the quest.) Anyone figure out how to do this? Link to comment Share on other sites More sharing options...
archerkb Posted April 19, 2012 Share Posted April 19, 2012 Could I ask how/where you read Bethesda's own use of those functions? I'm not really capable of answering the question yet, but it sounds like something that might be fun to investigate tonight after work ;D Link to comment Share on other sites More sharing options...
Recommended Posts