zaira Posted July 8, 2018 Posted July 8, 2018 I need a way to detect doors that have teleporters - a way out of the current building. The reftype HouseMainDoorRefType is not set everywhere. The use case: I want to send a NPC from one house to another house. The problem: He often does not find the path and stays. For towns and cities I found a workaround - I capture the parent location and locate a RefType marker (MapMarker, CenterMarker) - then I let the NPC walk to this marker until he leaves the current cell and from outside he always find the path. But if I could detect the house door I could lead him to the door and let him activate the door - this would work everywhere.
Content Consumer Posted July 8, 2018 Posted July 8, 2018 Could you do something like run a cloak spell to detect nearby load doors, then pathToReference the closest one? Assuming the house has only one door. Or maybe detect the closest door teleport marker instead - they're usually put close enough to the door that any reasonable AI should be able to find it once there. I dunno, I've never tried something like that. Just a guess.
zaira Posted July 12, 2018 Author Posted July 12, 2018 This does not help : most houses have doors inside. I didn't find any criteria to differentiate between doors with and without teleporter. The teleport marker seems to be invisible for modders - I found no way to query it from papyrus - I enumerated all objects from a cell and there was never such thing like a teleport marker.
zaira Posted July 12, 2018 Author Posted July 12, 2018 Found the solution with SKSE: bool HasTeleport(StaticFunctionTag *base, TESObjectREFR *theDoor) { return theDoor->extraData.HasType(kExtraData_Teleport); }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.