How can I test when the player is playing an idle?

Post » Thu Jun 21, 2012 10:56 pm

Is there a way to test which animation is currently playing? I looked at the full animation variable dump but it's hard to tell what is what.

Long version, I'm just about done with the See You Sleep mod, and I'm working on a feature which detects if the player was in first person when activating the bed, which calls my cool functions and shows the player sleeping in the bed. However when they wake up I have to restore the camera to first person, and currently I'm useing a crude wait feature of 7 seconds to put the camera back in first person, which is about how long it takes to crawl out of bed. However, various beds have various times getting up, so it's not perfect.

I'd like to detect when the player is idle or ready to move around again, or when its not playing the get out of bed animation state, either way would work for me, at that point I re-enable player controls and force first person back on the player.
User avatar
Sheila Reyes
 
Posts: 3386
Joined: Thu Dec 28, 2006 7:40 am

Post » Thu Jun 21, 2012 12:13 pm

You could easily detect that the player is moving the PC THEN switch the view.

or try this:

(ME.getAnimationVariableBool("bHeadTracking")) ;-- I use this to see when NPC are up from falling to the ground in combat, not sure if it works on the player.

But these may work:

bAnimationDriven
bIdlePlaying

One thing you should be aware of is that I have discovered that some of these var scans do not work on the player in first person, but do work in third person.

Is there a way to test which animation is currently playing? I looked at the full animation variable dump but it's hard to tell what is what.

Long version, I'm just about done with the See You Sleep mod, and I'm working on a feature which detects if the player was in first person when activating the bed, which calls my cool functions and shows the player sleeping in the bed. However when they wake up I have to restore the camera to first person, and currently I'm useing a crude wait feature of 7 seconds to put the camera back in first person, which is about how long it takes to crawl out of bed. However, various beds have various times getting up, so it's not perfect.

I'd like to detect when the player is idle or ready to move around again, or when its not playing the get out of bed animation state, either way would work for me, at that point I re-enable player controls and force first person back on the player.
User avatar
Vicki Gunn
 
Posts: 3397
Joined: Thu Nov 23, 2006 9:59 am

Post » Thu Jun 21, 2012 1:06 pm

BAnimationDriven worked perfect in a while loop. Bidleplaying I think only works when the player is actually playing one of the idles, like drinking from a cup, sweeping, etc.
User avatar
Ice Fire
 
Posts: 3394
Joined: Fri Nov 16, 2007 3:27 am


Return to V - Skyrim