icecreamassassin Posted July 28, 2015 Share Posted July 28, 2015 So I have long fought with the havok system and after much work have found that this little script will effectively keep dynamic NIF objects in place and prevent them from moving under any circumstance. The key seems to be in the FALSE bool on the motionsystem function which basically forces the NIF to ignore all imbedded havoc simulations until it is hit or Z keyed, or whatever, but then the keyframe setting removes those interaction possibilities as well. The vanilla havok script has the bool as TRUE which allows it to pass havoc events to the object if you so wish, effectively making the vanilla script useless because it doesn't truely disable havoc, it only manages it, and poorly at that. If you have a heavily loaded cell or too many managed objects, they just start falling off the walls. The FALSE bool appears to block the NIF from defaulting to it's imbended havoc behavior while the system is thinking about what to do. The vanilla script also is conditioned to require the model to be fully loaded before the script is attached, and if that fails then the motionsystem set will fail, removing this condition also seems to improve the stability of this function. The reset to editor location is basically there as a failsafe encase the 3D does manage to load before the motionsystem is stabilized. The block activation is completely optional and you can remove it, I just use it because I use a few actual weapons as displays and this prevents them from being able to be taken. Scriptname DBM_DynamicDisplayScript extends ObjectReference EVENT onLoad() BlockActivation(true) setMotionType(Motion_Keyframed, FALSE) self.MoveToMyEditorLocation() endEVENT EVENT onCellAttach() BlockActivation(true) self.MoveToMyEditorLocation() endEVENT EVENT onLoadGame() BlockActivation(true) if (Self.Is3DLoaded()) setMotionType(Motion_Keyframed, FALSE) Endif self.MoveToMyEditorLocation() endEVENT Link to comment Share on other sites More sharing options...
icecreamassassin Posted July 29, 2015 Author Share Posted July 29, 2015 added an extra block of code that was missing which will disable havoc as soon as the item 3D is loaded rather than waiting until the cell loads or the game loads Link to comment Share on other sites More sharing options...
rms827 Posted August 3, 2015 Share Posted August 3, 2015 Awesome work. I haven't had to fight this fight YET, but I've heard plenty of others complain. Used a few mods where non-havok things still got knocked all over the place also. When I start building buildings and such, I'll put this to use, and give you credit for it. PS: LOVE the Legacy of the Dragonborn mod too even if it is driving me nuts hunting everywhere for stuff for displays. :D How could you forget The Fork of Horripilation though? Link to comment Share on other sites More sharing options...
icecreamassassin Posted August 4, 2015 Author Share Posted August 4, 2015 I didn't I just left it for the immersive weapons addon ;) Link to comment Share on other sites More sharing options...
WhiteWolf424242 Posted August 2, 2020 Share Posted August 2, 2020 And it's still awesome. The vanilla script didn't work for me at all, and I've been looking for a solution for hours now. But this script works flawlessly (I'm not using the BlockActivation, it's just for a dagger "stabbed" into a desk.) Thanks for sharing this all that time ago :laugh: Link to comment Share on other sites More sharing options...
dafydd99 Posted August 27, 2020 Share Posted August 27, 2020 Just a warning here - this script is quite stack intensive if over used. I made the mistake of putting around a hundred refs in a cell using this script, and started getting intermittent crashes to desktop. And it was a bugger to track down I can tell you! ;-) My solution was to go to the nif and change the 'motion system' to MO_SYS_INVALID. Of course I may come back in a week or two and find that's not the problem... Link to comment Share on other sites More sharing options...
NexusComa2 Posted August 30, 2020 Share Posted August 30, 2020 As far as havok Skyrim cells have an odd way of handling that. The real time havok doesn't engage until you enter the interior. Problem is things may not be settled and the havok can make a mess of things as everything is not acting correctly. This could have been avoided in the kit if havok was turned on for a moment to let things settle. Then switched back off. The ideal way this should work is when things have settled pass the 1st havok "push". Anyways the other way to get around this to enter a cell then walk right back out. When you enter again havok will act correctly. Link to comment Share on other sites More sharing options...
Recommended Posts