dePog Posted January 13, 2017 Share Posted January 13, 2017 Anybody know the script line that would check if my character was in an erected tent? Thanks in advance :) Link to comment Share on other sites More sharing options...
HeyYou Posted January 13, 2017 Share Posted January 13, 2017 Is the interior of the tent a separate cell? Link to comment Share on other sites More sharing options...
lofgren Posted January 13, 2017 Share Posted January 13, 2017 It's kind of important to know which mod the tent comes from Link to comment Share on other sites More sharing options...
dePog Posted January 14, 2017 Author Share Posted January 14, 2017 It's kind of important to know which mod the tent comes fromhmmm.. I suppose the tents are from Frostfall. I have been playing with Frostfall for sooo long I suppose I just take the tents for granted. Sorry. Link to comment Share on other sites More sharing options...
dePog Posted January 14, 2017 Author Share Posted January 14, 2017 Is the interior of the tent a separate cell?I was thinking of a standard tent, but now I realise that what I think of as standard is probably from Frostfall. The ones that are a separate cell would be like the Tent of the Northern Ranger. I know how to use scripting to check the cell reference so I could detect Northern Ranger tents. It's the Frostfall tents that I am not sure how to detect. Link to comment Share on other sites More sharing options...
cdcooley Posted January 14, 2017 Share Posted January 14, 2017 The FindClosestReferenceOfAnyTypeInListFromRef function (or one of its variants) is what I would use. You can make a FormList with known tent forms then find the nearest tent. It won't be perfect but since it works based on the center point of the object if you choose the right radius for your search you should be able to get it to only return a tent with a center close enough to the player's position that the player must be standing inside it. If you want to handle different tents you may need multiple lists so you can check different radius values based on their sizes. And if you need to support other mods (like Frostfall) without creating an actual mod dependency you can use the GetFormFromFile function to add specific tents to the FormList. Link to comment Share on other sites More sharing options...
dePog Posted January 14, 2017 Author Share Posted January 14, 2017 The FindClosestReferenceOfAnyTypeInListFromRef function (or one of its variants) is what I would use. You can make a FormList with known tent forms then find the nearest tent. It won't be perfect but since it works based on the center point of the object if you choose the right radius for your search you should be able to get it to only return a tent with a center close enough to the player's position that the player must be standing inside it. If you want to handle different tents you may need multiple lists so you can check different radius values based on their sizes. And if you need to support other mods (like Frostfall) without creating an actual mod dependency you can use the GetFormFromFile function to add specific tents to the FormList.Much appreciated. Will play around with this. Thanks Link to comment Share on other sites More sharing options...
lofgren Posted January 14, 2017 Share Posted January 14, 2017 GetCurrentTent() http://skyrimsurvival.com/home/campfire/mod-developers/camputil-api/#CampUtil_GetCurrentTent Link to comment Share on other sites More sharing options...
irswat Posted January 14, 2017 Share Posted January 14, 2017 I laughed when I saw there exists a GetCurrentTent() function. Link to comment Share on other sites More sharing options...
dePog Posted January 15, 2017 Author Share Posted January 15, 2017 GetCurrentTent() http://skyrimsurvival.com/home/campfire/mod-developers/camputil-api/#CampUtil_GetCurrentTentSo? I download the Campfire mod and it will add the GetCurrentTent() function to the CK ? Link to comment Share on other sites More sharing options...
Recommended Posts