Hoamaii Posted February 8, 2017 Share Posted February 8, 2017 @ kitcat81: Yeah, you may be better off using quests and aliases, I have been fiddling with FO4 furniture (non-Worshop ones) last night, and activation does not seem to fire twice on these. OnGetUp() does not return either (even on the Sit Furniture markers) but there's a new Function called "OnExitFurniture(ObjectReference akActionRef)" which may suggest that actors do activate furniture when they leave it - or that FO4 attaches another function than activate to exiting furniture... http://www.creationkit.com/fallout4/index.php?title=OnExitFurniture_-_ObjectReference I'll continue testing anyway and let you know if I find anything that may help you. @ YouBetterWork: You've been doing that in FO4?.. I was under the impression that "SendAnimationEvent(ObjectReference akRef, string asEventName)" was no longer a valid function in Fallout 4 and that it was somehow replaced by "PlaySubGraphAnimation"? If it's Skyrim, what they mean by "it" is the "SendAnimationEvent" function. The difference between "PlayIdle" and "SendAnimationEvent" is that many idles have conditions checks before the animation is sent to any actor while "SendAnimationEvent" does not use conditions, therefore "PlayIdle" will not always work whereas "SendAnimationEvent" plays more reliably. I've used both a lot in my Skyrim mods. And because "SendAnimationEvent" has no condition check, it may happen that you get your actor playing an animation he cannot exit - in which case, to make him quit the animation he's stuck in you will need to either cast "PlayIdle(IdleStop_Loose)" or (way more reliable) "SendAnimationEvent(MyActor, "IdleForceDefaultState"). Both result in resetting your actor to its default idle. But as long as you carefully prevent the animation to be sent under wrong circumstances (like sending a 3rd person only animation to a 1st person PC, making sure his weapons are sheathed, and he's not swimming nor riding nor flying nor dead nor unconscious nor in combat, etc.), they're perfectly safe to use. The hardest thing in fact is to try and foresee all the conditions which can make your animation go wrong and exclude them in a series of "If..." conditions in your script. Same goes with Fallout 4 - you can get stuck in Idles as well as in animationEvents. At least in Skyrim, your PC could always jump out of animation, in Fallout 4 that does not seem to work anymore... Link to comment Share on other sites More sharing options...
Hoamaii Posted February 8, 2017 Share Posted February 8, 2017 @ kitcat81: Just out of curiosity, which workbench exactly are you trying to make your NPC exit? I'm in the CK right now, while checking behavior Data files in the same time, and there seems to be specific exit animations per furniture type (makes sense) - if I knew which exact furniture you're trying to script, I may be able to help you a bit. Link to comment Share on other sites More sharing options...
Hoamaii Posted February 9, 2017 Share Posted February 9, 2017 @ KitCat81: Just a hint: try "playIdle(FurnitureExitDefault)" or "PlayIdle(FurnitureExitToStand)" Link to comment Share on other sites More sharing options...
kitcat81 Posted February 9, 2017 Author Share Posted February 9, 2017 I remember something about thinking of the furniture as if it was a menu, and writing the script with that in mind. "Menuopen", close, etc....or whatever the calls were for menu entry and exit. Sorry, that's about all I can remember (if I'm remembering correctly at all or even close, heh). Maybe it'll give you a thought, though. Thank you for the input ! i will try, though the furniture reminds me rather a trap. There is a function to enter, but no fiunction to exit :D That really helped me. Thanks! Not at all! Link to comment Share on other sites More sharing options...
kitcat81 Posted February 9, 2017 Author Share Posted February 9, 2017 @ KitCat81: Just a hint: try "playIdle(FurnitureExitDefault)" or "PlayIdle(FurnitureExitToStand)"Thanks a lot , this was interesting to know about the Skyrim and all the differences and details. It`s quite hard to find enough information about some functions and things. I create a mod for FO4, I just probably did not notice the page was for skyrim lol. I had to use Skyrim wiki a lot because there is more info there. Most things do work ..sometimes with some minor changes. But some really cool functions I have found in Skyrim wiki do not exist in FO4. What a pity. The thing with the furniture was .... I needed this for a chair ( I think it`s called short federalist bench in the CK . But it`s actually just a usual chair which I turned into a workshop guardpost. It added a magic effect to npc OnActivate. And then started a timer. On Timer it checked different conditions and if they were not met, it was supposed to make npc stand up and exit (if the npc was still sitting ).Then if the npc re-enteres after some time, the cycle repeats. I could not find a solution for exit that times and changed it all to invisible "standing" furniture marker that disables and re-enables itself on timer. I could just make it attach the effect again without exitting..But exitting was better as it only makes the effect attached if the npc decides to enter back. This works fine but limits me to using only standing markers, so I still want to know how to do it. I might need it for other objects and just for learning pupose. And there is another thing with animations which i was going to test. I`ll try to be short. I have an assignable object that is registered for some events and when events fire the npc assigned to the object should hit the gong ( a part of this furniture) . The script itself work fine, but I got some minor problems with the animation. I used an alias and a package to make the npc hit the gong with a sledge. But it`s not a furnriture animation or an idle, NPC-s choose the combat animation randomly so they try to hit it , but miss 50% of times. I thought maybe there is a way to make them turn to the marker and play some certain "hook" instead of adding a use weapon package. Not ure if this is possible at all or if this is a relible way. Link to comment Share on other sites More sharing options...
kitcat81 Posted February 10, 2017 Author Share Posted February 10, 2017 (edited) I will try exit idle. Had an experiment with another idle some time before which worked funny and not always. But it was not the proper idle, just a random idle that worked for sandbox. Those warnings about animations in the wiki are really confusing. So many things I want to try, not enough time for everything. Edit :. For exitting any furniture I accidently have foiund an alternative way that does not require loaded 3d ...Changing the owner makes them turn unassigned and exit, setting them back as owners makes them back assigned Edited February 10, 2017 by kitcat81 Link to comment Share on other sites More sharing options...
Recommended Posts