irinotecan Posted July 23, 2017 Share Posted July 23, 2017 Let's say I have a quest alias filled with an actor NPC. I want to determine who that actor's father is (if there is one), and fill a second alias with that actor. I can't seem to find any script function that says, "Iterate through the given actor's relationships, and get the AssociationType for each". Everything seems to assume I know already who the second actor is, and then looks up the relationship between the two. But what if I don't? How do I do this without iterating through every single actor in Skyrim to see if, on the off chance, one has the relationship type I'm looking for? Link to comment Share on other sites More sharing options...
TheDungeonDweller Posted July 23, 2017 Share Posted July 23, 2017 (edited) https://www.creationkit.com/index.php?title=HasAssociation_-_Actor You can use GetNumRef with SKSE to grab all actors in a cell(and it will do just that, hence this function is slow).https://www.creationkit.com/index.php?title=GetNumRefs_-_Cell And then check their associations with each other with GetRelationshipRank and then use HasAssocation. Or probably skip GetRelationshipRank and just use HasAssociation. I'm terrible at arrays but if I weren't, I'd gladly write an example code out for you. The idea I got in my head is to iterate through the actors against the one I care about(the first actor) and the function will return whatever association type I'm concerned with. Obviously you want the functions' type to be AssocationType so it will return such. Edited July 23, 2017 by TheDungeonDweller Link to comment Share on other sites More sharing options...
Recommended Posts