Player freezes after playing paired animation.

Post » Wed Jun 20, 2012 5:40 am

I have a script fragment that calls out a paired animation with the target when the activator in the perk is used. The animation it uses is the pa_HugA animation. Most of the time it works like a charm. It shows the players character hugging the npc that was targeted.

Sometimes though, as when used on Sleepers or NPCs that are sitting, or leaning at a bar, the player freezes up and loses all controls afterward. I've tried disabling/enabling controls. i've tried translating the character just slightly but so far nothing works.

Any tips?
User avatar
stevie critchley
 
Posts: 3404
Joined: Sat Oct 28, 2006 4:36 pm

Post » Wed Jun 20, 2012 9:36 am

Drakea,
You and I are working on similar themed mods. I ran into the same problem using paired animations too. Are you calling the playervampirefeed in the perk before playing the anim?

-MM
User avatar
Britney Lopez
 
Posts: 3469
Joined: Fri Feb 09, 2007 5:22 pm

Post » Wed Jun 20, 2012 1:41 pm

Drakea,
You and I are working on similar themed mods. I ran into the same problem using paired animations too. Are you calling the playervampirefeed in the perk before playing the anim?

-MM

I am, however I've removed the animations from the VampireFeed function in my main vampire script. Id this because I have more then one perk accessing the same function. So I instead added the animations to the perk fragments.

Feeding on sleepers works fine. I'm having the problem with awake NPCs that seem to be in animation loops or idle animations that keep them in a frozen state.

For example as I mentioned above if the NPC is leaning, sitting or doing anything other then walking, standing or playing an instrument the player will freeze up.
User avatar
Fluffer
 
Posts: 3489
Joined: Thu Jul 05, 2007 6:29 am

Post » Wed Jun 20, 2012 3:11 pm

There are two calls in the base fragment. One is to the game scripts own vampire feed. You may need to remove that if it's still there.

-MM
User avatar
XPidgex Jefferson
 
Posts: 3398
Joined: Fri Sep 08, 2006 4:39 pm

Post » Wed Jun 20, 2012 7:04 pm

There are two calls in the base fragment. One is to the game scripts own vampire feed. You may need to remove that if it's still there.

-MM

Hmm, what do you mean the game scripts own vampire feed? I was under the impression that the VampireFeed function only existed in the pc vampire script? Do you mean the game has Vampire Feeding hardcoded? As in the VampireFeed perk? I do see the condition for GetVampireFeed. Why would the perk need that condition if the function is already being called to from a script?
User avatar
vicki kitterman
 
Posts: 3494
Joined: Mon Aug 07, 2006 11:58 am

Post » Wed Jun 20, 2012 9:16 am

I removed GetVampireFeed from the perk but it did not change the problem.

Perhaps important to note is that the player must be Sneaking in order to get the prompt to 'Quick Bite' on awake NPCs. As soon as it finishes the animations it forces the player back to Sneaking. That's just the game doing that by default I dont have that scripted in.
User avatar
Shiarra Curtis
 
Posts: 3393
Joined: Thu Jan 04, 2007 3:22 pm

Post » Wed Jun 20, 2012 6:41 am

I see now what you meant MM. There is a "Game.GetPlayer().StartVampireFeed" in the perk fragment. StartVampireFeed is its own hardcoded game function which determines basically what animation to play when the player is at a bedroll or bed and from which side.

Thanks. Removing that didn't solve the fact that the called animation doesnt play but it did solve the player freezing. :)
User avatar
Nuno Castro
 
Posts: 3414
Joined: Sat Oct 13, 2007 1:40 am

Post » Wed Jun 20, 2012 5:00 pm

Well, you got the one I was thinking of. The actor has their own StartVampireFeed method. And in fact you are doing the exact same work I was doing when I ran into the problem.

Just for clarity (and mind you that I think about it am now in front of my computer instead of another device) here's the script fragment of the default:

Game.GetPlayer().StartVampireFeed(aktargetRef as actor)PlayerVampireQuest.VampireFeed()

I had changed mine to

BeluaVampireQuestScript.VampireSneakFeed(aktargetRef as actor)

Maybe this will help you. I did fix it...and what started it for me was two things:

I tried using the standard vampire feed animation as a paired animation just to see what would happen
And I implemented some code to rotate the player so that he was always directly behind the victim.

Here's my code that's currently working:

  Player.MoveTo(akTarget, offsetx, offsety, 0,abMatchRotation = true)  Player.PlayIdle(VampireFeedingBedRight_Loose)  Game.ForceThirdPerson()

The moveto work was graciously provided by RandomNoob.

Perhaps if you are doing the same, you might try a WAIT statement after the moveto. My character was literally teleporting to a bed with another actor, and then moving back and would get stuck. And sometimes just get stuck.

-MM

Edit: Removed extra line. Awesome. I thought that's what had fixed it for me, but then I thought maybe I was wrong. I've invested so much time into timing and doing some other things in my sneakfeed method.
User avatar
Madison Poo
 
Posts: 3414
Joined: Wed Oct 24, 2007 9:09 pm

Post » Wed Jun 20, 2012 4:29 pm

You know it's funny. In the default script for vampires they added a single animation play in the VampireFeed function. And then they went and made seperate functions for every other animation that has to do with feeding on sleepers. Like left/right from every bedroll or bed.

I noticed even before I started modding vampires that when you went to feed on a sleeping NPC it didn't always play the proper animation. As well, the functions created in the default script that do nothing but call out an animation are never used again in the default script. So that means something else (I venture to guess StartVampireFeed) like a hardcoded function is using them.

That seems like such a silly way to do it. Maybe I'm missing something but regardless it still means that the animations for vampire feed in vanilla don't always play appropriately.
User avatar
Elizabeth Davis
 
Posts: 3406
Joined: Sat Aug 18, 2007 10:30 am

Post » Wed Jun 20, 2012 3:35 pm

Well this is interesting. I removed the ;Game.GetPlayer().PlayIdle(VampireFeedingBedRight) from the main script and the bed/bedroll animations still play and with the same bugs.

It appears that the ;Game.GetPlayer().PlayIdle(VampireFeedingBedRight) was there way of trying to get past a bug they didnt have time to fix? Dunno.
User avatar
Nauty
 
Posts: 3410
Joined: Wed Jan 24, 2007 6:58 pm


Return to V - Skyrim