kinggath Posted August 28, 2016 Share Posted August 28, 2016 In terms of, how is it related to the player or an NPC when it's in use. Specifically, I'm trying to grab a reference to whatever furniture piece the player or an NPC is using at a given point, without having to monitor all furniture for when it's activated. Is it set up as a temporary Linked Reference until exited? Link to comment Share on other sites More sharing options...
TummaSuklaa Posted August 28, 2016 Share Posted August 28, 2016 This is what I love about Fallout 4 modding. You can monitor by keyword most likely which greatly reduces the range of your search to just a specific type furniture, as the majority of them have keywords attached. And if more than one in the area, then you can check which one the player/NPC is using http://www.creationkit.com/index.php?title=IsFurnitureInUse_-_ObjectReferenceTo monitor by keyword, I believe you can use FindAllReferencesWithKeyword. This grabs all references with that keyword and stores them to an array. Link to comment Share on other sites More sharing options...
kinggath Posted August 28, 2016 Author Share Posted August 28, 2016 Thanks for the reply! That's what I have right now and it works great at grabbing the furniture and telling me it's in use. What I can't figure out is which NPC (or if the player) is using the furniture when isFurnitureInUse comes back true. I was hoping there was something more formal that connected the Player/NPC and the furniture while it was use. The best I've come up with is to monitor furniture for the OnActivate event and "record" the ObjectReference that activated it, but that seems really inefficient. Also, this method doesn't work if I come across a piece of furniture that is already in use. Link to comment Share on other sites More sharing options...
TummaSuklaa Posted August 28, 2016 Share Posted August 28, 2016 Well there is a way for the player at least, by way of a magic effect attached to a spell, with the condition set to IsInFurnitureState(http://www.creationkit.com/index.php?title=IsInFurnitureState -Yes it's the Skyrim wiki, but ALL of the condition functions carried over and I'm sure that is one of the many that is valid for Fallout ), and when that's true, the code in the magic effect script will fire. For NPCs, I can't think of anything that wouldn't take a lot of work, while still not solving the problem of returning the actual reference. Link to comment Share on other sites More sharing options...
kinggath Posted August 29, 2016 Author Share Posted August 29, 2016 Oh that actually opens up a whole new bag of tricks for me if most of the Skyrim functions carry over! I've been working under the assumption this list was all I had to work with: http://www.creationkit.com/fallout4/index.php?title=Category:Papyrus Link to comment Share on other sites More sharing options...
TummaSuklaa Posted August 29, 2016 Share Posted August 29, 2016 It just takes a bit of common sense that's all. Some events don't work for fallout as well as some of the condition functions, but all in all, the CK for Fallout is almost a 1:1 copy of Skyrim's, just with some Fallout specific additions. Link to comment Share on other sites More sharing options...
Recommended Posts