Jump to content

Animation events firing unexpectedly


Recommended Posts

I have:

    RegisterForAnimationEvent(PlayerRef, "weaponSheathe")
    RegisterForAnimationEvent(PlayerRef, "weaponDraw")

in a script on a playeralias.  I notice that the functions I've scripted in the OnAnimationEvent will fire when I activate a crafting station and also during dialogue, in SkyrimSE I was able to use RegisterForActorAction without this happening, since F4 doesn't have that I'm following advice to use the OnAnimationEvent, am I using the right events to detect when the user instructs the playercharacter to draw and sheathe their weapon using keyboard/controller?

 

diziet

Link to comment
Share on other sites

As far as I know, there's no weapon state change event exposed to vanilla Papyrus and the animation event was used by BGS too.

I think I can add Action event to Garden of Eden SE in an update if dependency isn't an issue but if the native code sends animation event unexpectedly there's a chance Action event would be sent too and you'll have to filter the events in Papyrus with if statements anyway.

Link to comment
Share on other sites

The weapon would logically sheathe and draw as you move in and out of dialogue and workbench, purely in terms of animations. Since there seems to be no native function that keeps track of these events happening as a result of direct player button presses, and until Larann has created one, a workaround would be to handle the indirect cases with if-true statements (predicates) one by one using IsInDialogue and IsInWorkbench functions. These are not their actual names I think and you would have to investigate further into the native functions, or condition functions in CK, to create that list of eliminations. You then ditch the event early in the Event handler if those conditions are met.

I say workaround but this is really just regular programming.

Create a function that deals entirely with this to remove some clutter in the handler.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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