nosdregamon Posted April 3, 2017 Posted April 3, 2017 It seems, that the players collision is not changed by crouching/sneaking. I suspect it's the skeleton node "CharacterBumper". So, I wanted to do add a little quest and a player alias with a script, to detect when the sneaking begins. Then I'd use NIOverride to shrink the node (and see what happens, I'm not sure, it would help at all). Scriptname sneakDetector extends ReferenceAlias Import MiscUtil import NetImmerse actor property player auto Event OnInit() player = Game.GetPlayer() MiscUtil.PrintConsole("Alias Initialized") RegisterForAnimationEvent(player, "tailSneakIdle") RegisterForAnimationEvent(player, "tailSneakLocomotion") RegisterForAnimationEvent(player, "tailMTIdle") RegisterForAnimationEvent(player, "tailMTLocomotion") EndEvent Event OnPlayerLoadGame() MiscUtil.PrintConsole("Alias GameLoaded") RegisterForAnimationEvent(player, "tailSneakIdle") RegisterForAnimationEvent(player, "tailSneakLocomotion") RegisterForAnimationEvent(player, "tailMTIdle") RegisterForAnimationEvent(player, "tailMTLocomotion") endEvent Event OnAnimationEvent(ObjectReference akSource, string asEventName) if (akSource == player) if (asEventName == "tailSneakIdle" || asEventName == "tailSneakLocomotion") MiscUtil.PrintConsole("Sneaky!") ;if (NetImmerse.getNodeScale(player, "CharacterBumper")>0.5, ?) ; NetImmerse.SetNodeScale(player, "CharacterBumper", 0.5, ?) ;endif endIf if (asEventName == "tailMTIdle" || asEventName == "tailMTLocomotion") MiscUtil.PrintConsole("Standing upright") ;if (NetImmerse.getNodeScale(player, "CharacterBumper")<1.0, ?) ; NetImmerse.SetNodeScale(player, "CharacterBumper", 1.0, ?) ;endif endif endIf endEvent This led me to notice I'm missing something: 1) How to best register for Events? Does "OnInit" work for the "duration" of my quest, or will it be gone on the next reload? Is "OnPlayerLoadGame" better, or will there be such a thing as double registrations (which sounds like save game bloat). 2) If I deinstall my mod, which removes the quest, will my registration still fire? If so: Is there a best practice to implement an automatic abort? 3) How to use NIOverride "firstperson" parameter? It has no default, and obviously I can only set it to true or false, but I have no clue what it's good for, and how to set it. I also can't find documentation for NIOverride. Any Clues/Links?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.