ScottyDoesKnow Posted November 24, 2017 Posted November 24, 2017 I've made/customized a survival tent mod for saving, but I want to restrict it to only work outdoors. Is there an easy way to check if the player is indoors (like fast travel does)? I don't care about being inside a building or under an awning, only if you're in an indoor cell.
montky Posted November 24, 2017 Posted November 24, 2017 (edited) there's a few ways,RedRocketTV has some ideas,Shavkacagarikia has a few snippetsValyn81 talks about another approach herehttps://forums.nexusmods.com/index.php?/topic/6174918-help-with-understanding-the-ugrids-relation-to-interiorexterior-buffer/ SMB92 and fiftytifty have a few different approaches,as does BlahblahDeeblahblah. Ruadhan2300 takes a different approach,which might be adaptable to 'deployable temporary 'any-door-to-any-where' refs,like a tent which leads to "Tent Interior New Lands"...sorta like a 'TARDIS Tent". hehe. EDIT: @ScottyDoesKnow,no problem hehe. There's a few different ways to do it, so perhaps some combo is what you're looking for.the onEvent temp buffer approach is probably the way to go if the tent is redeployable hopefully, those are some ideas to detect what cell-type the tent is deployed within.I look forward to seeing what you come up with. Edited November 24, 2017 by montky
ThoraldGM Posted November 24, 2017 Posted November 24, 2017 If Game.GetPlayer().IsInInterior() https://www.creationkit.com/fallout4/index.php?title=IsInInterior_-_ObjectReference
shavkacagarikia Posted November 24, 2017 Posted November 24, 2017 (edited) you can check it with: Game.getplayer().IsInInterior()oops, it seems I'm bit late :D Edited November 24, 2017 by shavkacagarikia
ScottyDoesKnow Posted November 24, 2017 Author Posted November 24, 2017 Thanks so much! Especially for the effort you put into your response montky.
JonathanOstrus Posted November 25, 2017 Posted November 25, 2017 you can check it with: Game.getplayer().IsInInterior()oops, it seems I'm bit late :D This is a general way of doing the detection but not necessarily 100% accurate. There could be situations where the area is actually a worldspace not an interior cell. I can't think of one that happens in Fallout 4 but there are quite a few in Skyrim.
ScottyDoesKnow Posted November 25, 2017 Author Posted November 25, 2017 For my implementation, I'm fine with that inaccuracy for ease of use. Thanks for the heads up though.
Recommended Posts