Jump to content

[LE] Need help to test if your character is in erected tent (Skyrim)


dePog

Recommended Posts

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...