I am one of the lucky (ahem) owners of Dawnguard on PC who was struck with the 'cannot stay in 1st-person mode for more than a second' bug, as detailed on this forum and over at Skyrim Nexus' forums.
Somebody mentioned that it seems like it happens every second, or every two seconds, and that most likely this meant that the game was erroneously running some kind of script that regularly checked the view state and then forced it into 1st-person.
From researching this issue on this and other forums, I found that there is a function available within Papyrus to check the player's state [Game.GetPlayer().GetAnimationVariableInt("i1stPerson")], and whether it's currently in 1st-person or 3rd-person, and then force one or the other (Game.ForceThirdPerson()). I made a simple script that performed this check when the player clicks on a stone in a test cell, and I proved to myself that you can in fact force the view to change back to 1st-person from 3rd-person:
Scriptname KillThirdPerson extends ObjectReference Event OnActivate(ObjectReference akActionRef) If Game.GetPlayer().GetAnimationVariableInt("i1stPerson") == 0 Game.ForceFirstPerson() Debug.MessageBox("Was 3rd Person") else Debug.MessageBox("Was 1st Person") endifendEvent
But, exactly as happens when using the 'toggle FOV' key, it reverts back to 3rd-person almost immediately. But it occurred to me that it might be possible to write a script that uses OnState to check the player's state say, ten times per second, and whenever it finds the state in 3rd-person, it switches it to 1st-person; meaning that effectively, you would only ever be in 3rd-person view for a tenth of a second at most. Depending on how much computational load this puts on the game, it might be possible to bump up the repetition rate such that you'd never see yourself in 3rd-person. The last step, of course, would be to somehow bind this script to an object in-game, or a power or effect or something.
As you can probably tell, I am a complete beginner at this. I spent almost the entire day today reading tutorials on the Creation Kit site, as well lots of others on different sites. I've tried a bunch of different things -- in particular, tried to implement the OnState calls that allow an event to be repeated every X seconds, and is discussed in a tutorial over at The Engineering Guild, but for the life of me I just can't make any progress.
But I have a strong feeling that someone with more scripting experience could probably put this together pretty quickly. So might anyone want to give me a hand here, or at least some pointers? Basically I want to do this:
1) Create a ring that will be automatically be given to the player upon load
2) Equipping this ring will start a script that checks every Nth of a second on the GetAnimationVariableInt("i1stPerson") property, and if it ever finds it to == 0, it will issue a Game.ForceFirstPerson().
3) Unequipping the ring will stop this script, thereby allowing the player to go back into 3rd-person mode if they choose.
So does this have any chance of working? Might there be a better way to do it?