Hoamaii Posted June 7, 2018 Share Posted June 7, 2018 Hi guys, I need some advice on something quite simple (or so I thought) I'm trying to do with a piece of furniture. Basically, I need to blockActivation so that the player can access a menu while I also need to let NPC use that furniture freely. Nothing simpler in Skyrim: you block activation onInit() and call Self.Activate(akActionRef, true) when some NPC comes around. Doesn't work at all here. Debug shows me NPCs need to activate that form several times: a 1st time when they reserve the furniture, a 2nd time when they activate it, yet a 3rd time when they start the ChairEnter animation, then another 4th time when they try to exit. I've been trying to use states to keep track of where they are. I've been trying to unblock activation when NPCs activate, and block it again when they exit (works slightly better but not great). I've been editing my script in many different ways a dozen times. I've even been trying to add 2 distinct scripts to that form, one for player, one for NPCs. Results are all the same: at times it'll work ok, at other times NPCs will remain indefinitely stuck, jolting around that furniture and desperately trying to activate it unsuccessfully. :wallbash: I know I could add a second activation option with a perk, but that seems kind of far-fetched for such a simple action. Also VERY frustrating because were it not for that my mod is 99% finished. What obvious solution am I overlooking here? Many thanks in advance for any advice :smile: Link to comment Share on other sites More sharing options...
Hoamaii Posted June 9, 2018 Author Share Posted June 9, 2018 Well, if anybody's facing the same issue, there's a way to make it work without adding an activation perk or spawning a separate activator on top of a scriptless furniture - but it is fairly tedious for what used to be a simple task. I managed to get it to work by painstakingly listening to every activation they do (between 3 and 4 depending on the furniture - maybe related to animation sequences?) - and using states to track that down. Couldn't find a way to let human NPCs exit most furniture without unblocking activation first though. And incidentally, Dogmeat seems to ignore isActivationBlocked() entirely on some furniture. The way the Vanilla game blocks companion's activation is using "SetNoFavorAllowed()" but that does not stop them from activating while sandboxing, for that you need flags or keywords. So basically, there are many ways to block NPCs activation on furniture, but even though I found a workaround to my initial issue, I'm still looking for a simpler way to let NPCs use a furniture which has been blocked by a script. Link to comment Share on other sites More sharing options...
Recommended Posts