Tonycubed2 Posted January 28, 2020 Share Posted January 28, 2020 Hi, been working hard on a variation of Vigor where npcs receive injuries complete with animations. For falling down I am using knockdown code, see below. works great until the end, when the npc gets up and then goes into an endless loop walking in place. any ideas? ObjectReference kKnockObject = NPCPlayer.PlaceAtMe(FXEmptyActivator) kKnockObject.PushActorAway(NPCPlayer, 1) kKnockObject.Delete() utility.Wait(4.0) debug.SendAnimationEvent(NPCPlayer,"IdleForceDefaultState") debug.SendAnimationEvent(NPCPlayer,"IdleStop_Loose") Link to comment Share on other sites More sharing options...
Sclerocephalus Posted January 29, 2020 Share Posted January 29, 2020 The CK Wiki tells this about sending animation events to actors directly: " If you use it to send an event to actors, you will most likely mess up the actor permanently as the internal actor data may no longer match their animation state. " see: https://www.creationkit.com/index.php?title=SendAnimationEvent_-_Debug Link to comment Share on other sites More sharing options...
Tonycubed2 Posted January 29, 2020 Author Share Posted January 29, 2020 I appreciate you answering my post, Sclerocephalus. I did see that. I got like 6 other animations working fine though. Only this one is being a pain. Was hoping for a workaround. Link to comment Share on other sites More sharing options...
Jebbalon Posted January 29, 2020 Share Posted January 29, 2020 From the PlayAnimation page PlayAnimation cannot be called on actors. For actors, use SendAnimationEvent. This bypasses the check on ObjectReference that prevents sending events to actors. If you use it to send an event to actors, you may get the actor stuck in the animation (such as the bleed out animation). You can un-stick them by using PlayIdle(IdleStop_Loose). Link to comment Share on other sites More sharing options...
Tonycubed2 Posted January 29, 2020 Author Share Posted January 29, 2020 Jebbalon, I have indeed found out that sendanimation works pretty reliably if followed by idelstoplosse. However the knock down effect in my script is not sending any animations to the npc. It is invoking the effect on a activator near the pc and setting the radius small so only that npc is affected. But while the npc does fall down nicely and gets up fine he then starts jogging in place forever. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now