Playing an animation on a character

Post » Mon Jun 18, 2012 10:05 am

I'm trying to play the "recoil" animation on an NPC. I have a script attached to him and then a command to play a recoil animation inside an onhit event:

Self.GetRef().PlayAnimation("recoilStart")

In the wiki it says you provide the animation "event", so I think "recoilStart" is correct but it never does anything and it returns FALSE

http://www.creationkit.com/PlayAnimation_-_ObjectReference

I found the animation under here:

Gameplay -> animations
Actors\Character\Behaviours\0_Master.hlx
ActionRecoil
User avatar
Erin S
 
Posts: 3416
Joined: Sat Jul 29, 2006 2:06 pm

Post » Mon Jun 18, 2012 6:06 pm

I cannot believe no one has tried to use these functions? Please help if possible. Thanks
User avatar
Rudy Paint fingers
 
Posts: 3416
Joined: Sun Nov 11, 2007 1:52 am

Post » Mon Jun 18, 2012 9:30 am

Not sure if this can help. I'm still learning things myself, so take this advice with a grain of salt. ;)

Make sure the anim you're trying to use has the correct conditions to play. Conditions keep animations from playing at the wrong time. They are listed in a box next to the animation you highlight (You'll find them in Gameplay > Animation)For instance, the recoil anim is normally in the "fight group" of anims and will only play if a weapon is drawn, and the function from previous games was SetAlert 1 (1 and 0 being flags for on and off.)
User avatar
Chris Duncan
 
Posts: 3471
Joined: Sun Jun 24, 2007 2:31 am

Post » Mon Jun 18, 2012 2:51 am

I doubt you can play animations that are defined as an action -> the only anims I have been able to call from script are the ones listed under the Loose category -> and this includes the exact same script that works calling the loose anims not working when called on an action...

Though a Dev might have an example of a working script for forcing an action animation to play.

----

Also its no longer possible to call animations to play on an actor that, that animation does not belong to its race.
User avatar
Kayla Keizer
 
Posts: 3357
Joined: Tue Dec 12, 2006 4:31 pm


Return to V - Skyrim